added a solution to the partitioning a linked list problem