Cognizant Interview Question

Sort a doubly linked list