TwoSum algorithm implementation using hash map added