What is the most efficient way to check if two hashes h1 and h2 have the same set of keys disregarding the order? Could it be made faster or more concise with close efficiency than the answer that I post?
What is the most efficient way to check if two hashes h1 and h2
Share
Try:
Enumerable#all?
worse case scenario, you’d only be iterating through the keys once.