Bubble Sort function for linked list not working properly

[removed]
I realized that I made an embarrassing and simple mistake
Last edited on
temphead = temphead->next;

You should only do this when you've finished swapping the values of two nodes. Right now, you do it a LOT.
Topic archived. No new replies allowed.