Sort the given doubly linked list using bubble sort.  Examples:  Input : 5 4 3 2 1 Output : 1 2 3 4 5 Inputâ€¦ Read More
Sort the given biotonic doubly linked list. A biotonic doubly linked list is a doubly-linked list which is first increasing and then decreasing. A strictlyâ€¦ Read More
Prerequisite: Merge Sort for Linked Lists Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makesâ€¦ Read More
Given a Linked List, task is to check whether the Linked List is sorted in Descending order or not?  Examples :   Input : 8 ->â€¦ Read More
Given an array of size N and a Linked List where elements will be from the array but can also be duplicated, sort the linkedâ€¦ Read More
Given a linked list containing n nodes. The problem is to rearrange the nodes of the list in such a way that the data inâ€¦ Read More
Given a linked list of 0s, 1s and 2s, sort it. Examples: Input : 2->1->2->1->1->2->0->1->0 Output : 0->0->1->1->1->1->2->2->2 The sorted Array is 0, 0, 1,â€¦ Read More
This a common question asked in DS interviews that despite of better worst case performance of mergesort, quicksort is considered better than mergesort. There areâ€¦ Read More
Given a singly linked list containing n nodes. The problem is to sort the list using the recursive selection sort technique. The approach should beâ€¦ Read More
Given a doubly linked list containing n nodes, where each node is at most k away from its target position in the list. The problemâ€¦ Read More