solve problems from leetcode: http://leetcode.com/onlinejudge