My code is running properly

My code URL is :-https://ide.codingblocks.com/s/644561
plz correct my code

hi @chhabrarishi2001_264ecb7697e8af2a
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.

refer this code -->

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.