Solution of online judge problems from Leetcode