Ocado Technology Interview Question

Find 2 elements in a array that have sum n

Interview Answer

Anonymous

Nov 9, 2020

Added all elements into a Set, iterated them and for every element x I searched for (n - x) in the set. Complexity N, they seem to liked to solution