Partition Linklist to a given value. This method actually is not good. Optimize it further