Skip to content

Tag Archives: Linked-List-Sorting

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
Sort the doubly linked list using the insertion sort technique. Initial doubly linked list Attention reader! Don’t stop learning now. Get hold of all the important… Read More
Given a linked list that is sorted based on absolute values. Sort the list based on actual values.Examples:   Input : 1 -> -10 output: -10… Read More
Given a Linked List. The Linked List is in alternating ascending and descending orders. Sort the list efficiently. Example:  Input List: 10 -> 40 -> 53… Read More
Why is Quick Sort preferred for arrays? Below are recursive and iterative implementations of Quick Sort and Merge Sort for arrays.Attention reader! Don’t stop learning… Read More
Given a doubly linked list, write a function to sort the doubly linked list in increasing order using merge sort.For example, the following doubly linked… Read More
Given a singly linked list, sort it using bubble sort. We provide nothing but the best curated videos and practice problems for our students. Check… Read More
QuickSort on Doubly Linked List is discussed here. QuickSort on Singly linked list was given as an exercise. Following is C++ implementation for same. The… Read More
Following is a typical recursive implementation of QuickSort for arrays. The implementation uses last element as pivot. Attention reader! Don’t stop learning now. Get hold of… Read More
Given a linked list of 0s, 1s and 2s, sort it.Examples:   Input: 1 -> 1 -> 2 -> 0 -> 2 -> 0 -> 1… Read More
  Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as… Read More

Start Your Coding Journey Now!