JPMorganChase interview question

Find intersection of two lists

Interview Answer

Anonymous

16 Mar 2025

Convert the smaller one to a set. Iterate through the other list and check if that number is in the set. If so, add it to the result list.