Amazon Interview Question

Two sum Array and advanced DP