Its returning head

hey, i think you have posted the wrong code here
it is a code for bubble sort

no i posted correct code only its showing kindly check once https://ide.codingblocks.com/s/200760


check your insert function
instead of n->next = NULL
i changed it to n->next = head
which is correct
if your doubt is solved please mark it as resolved

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.