Welcome to the daily solving of our PROBLEM OF THE DAY with Dev Vikram We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Linked List but also build up problem-solving skills.
You are given a Linked List. Sort the given Linked List using quicksort.
Examples:
Input: Linked list: 1->6->2
Output: 1->2->6
Explanation:
After sorting the nodes, we have 1, 2 and 6.
Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/quick-sort-on-linked-list/1