solution of http://oj.leetcode.com/problems/partition-list/