Solution to Partition List