Microsoft Interview Question

The question was a simple 2sum question