Cannot grasp the solution of this question. A hint might help.
Cant understand how to solve this question with Util Class
hey @Rishabh8488
Algorithm :
-
Create an empty sorted (or result) list
-
Traverse the given list, do following for every node.
a) Insert current node in sorted way in sorted or result list.
- Change head of given linked list to head of sorted (or result) list.