Solve problems from leetcode (http://leetcode.com/onlinejudge).