Solution for https://oj.leetcode.com/problems/reorder-list/