5.15 Hash Joins
5.15 Hash Joins Problem You need to join two collections by matching keys. A nested loop join compares every item from the first collection with every item from the second collection. This is simple, but it costs O(nm) for collections of sizes n and m . A hash join reduces this cost by indexing one side in a hash map. Solution Build a hash map from the smaller collection, then...