Find the intersection of two integer lists
Utilisateur anonyme
why do you need this big code? Try to be simple while explaining simple ideas.. 1) add list1 elements to hash. 2) iterate through list2. check if the item is present in hash and add to output list. 3) return output list. Best way is to leave it here and ask politely if he wants to code this simple naive idea? Over explaining simple things will cast impression of small knowledge.