Hi,

I'm working with linked lists at the moment and was wondering what is the best way of sorting the list.

I would like to sort the nodes as I'm inserting them. For example, if the new node is better than the third node in the list (based on some evaluation) insert it in position three.


I know there is a template class available but I don't want to use it and would like to know how to do this myself.

Thanks