Hello, I was looking for some help in manipulating a linked list. I'm not looking for code so much as I am looking for a way to approach the problem.
I have a linked list, where the nodes each have a number as a member, lets say 4,3,1,2 and what i want to do is rearrange it to a linked list that follows the asceding order pattern... 1,2,3,4
I'm confused on how I might do this, how I could move my pointer along the linked list, compare values and rearrange them
I was thinking that i could somehow compare the members containing the number, then copy the max one to a temporary sturcture, then nsomehow free it from my linked list and push the new structre intol a new linked list....
Im having trouble developing an algorithm for this, can anybody help me.... Thank you very much