Goldman Sachs Interview Question

2 Sum with duplicates