How do I balance a linked list in C++?
To balance, I mean sorting the nodes in the list so that the node with the greatest value is at the head of the list, the second greatest node is at the end, and so on... (the data type is double)
Thanks for you help!!!
2007-03-20
06:37:06
·
3 answers
·
asked by
sheket
1
in
Computers & Internet
➔ Programming & Design
No, it is balanced as such"
Lets say you have a linked list of integers:
1->5->7->3->88
The postcondition would be:
88->5->1->3->7
Thus effectively balancing the biggest elements on either side...
2007-03-20
08:46:56 ·
update #1