Insertion Sort - Linked List

How can I use insertion sort in linked list as we have to traverse back in insertion sort??
Do I need to use a doubly linked list??

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.
  3. Change head of given linked list to head of sorted (or result) list.

refer this --> https://ide.codingblocks.com/s/622041

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.