algorithm notes: leetcode#170 two sum 3