solutions for leetcode OJ: http://oj.leetcode.com/problems/