Cognizant interview question

Sort a doubly linked list