Solved 3Sum problem