Add a similar solution to the partition linked list problem for the new online judge.