Solutions to algorithm problems posted on Oj.leetcode.com