http://leetcode.com/oldoj#question_17