GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

Shuffling a linked list

Given a singly-linked list containing n items, rearrange the items uniformly at random. Your algorithm should consume a logarithmic (or constant) amount of extra memory and run in time proportional to nlogn in the worst case.

I could not figure it out do it nlogn, some thoughts? 

asked Oct 2, 2016 by Yujia Lian