Cant understand how to solve this question with Util Class

Cannot grasp the solution of this question. A hint might help.

hey @Rishabh8488
Algorithm :

  1. Create an empty sorted (or result) list

  2. Traverse the given list, do following for every node.

        a) Insert current node in sorted way in sorted or result list.
  1. Change head of given linked list to head of sorted (or result) list.