Sort Linked List using Insetion Sort

HOw to perform insertion sort on linked list as in insertion sort we do decrement operations also .How to do same in this??

I am giving you the code for insert sort please look at it and try to understand the implementation, let me know if you are stuck anywhere

void insertSort(node* &head){
	if(head == NULL){
		return;
	}
	node* i = head->next;
	while(i != NULL){
		node* j = i->previous;
		node* iNEXT = i->next;
		//node *jPREV = j->prev;
		while(j != NULL && j->data > i->data){
			i->previous = j->previous;
			j->next = i->next;
			i->next = j;
			j->previous = i;
			if(j->next != NULL)
				j->next->previous = j;
			if(i->previous != NULL){
				i->previous->next = i;
			}
			if(j == head){
				head = i;
			}
			j = i->previous;
		}
		i = iNEXT;
	}
}

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.