Replace the HashSet for existing solution cache with a HashMap and a HashSet, the time complexity is still the same, and passed the large data set for 3Sum problem.