solution of http://oj.leetcode.com/problems/two-sum/