I rewrote the code still not working

can you plz edit and identity me mistakes,

@premang at line 88 this should be your condition to return head
if(head==NULL || head->next==NULL)
if next element is NULL means no need to sort.