PharmEasy Interview Question

Two sum problem and its optimizations