Implement an intersection method for two lists. After showing a brute force method, I was asked to improve upon the method and analyze time complexity for both algorithms.
Sigiloso
1. Traverse through the first list and put all items in a hash table. 2. Traverse through the second list and try to find these items in the hash table created in step 1 -> Add all items found to the intersection list. O(N) complexity.