Sort linked list using insertion sort

https://ide.codingblocks.com/s/60926

it is producing wrong answer for 1 test case. wht is the error ?

Hi Yukti, just change the line number 49 to while(insert_ptr!=current_ptr) instead of while(insert_ptr->next!=current_ptr). Your code was running one time less. Rest of the logic is fine.