linklist

if we have a link list , we need to sort it then we will use which sorting technique ( insertion, bubble, merge etc)?
Whichever technique that you wish to use. std::list is a doubly linked list which has a built in sort member function. I don't know what style of sort it uses but it has always worked great for me. there is no way that anyone could answer your question without knowing the requirements of your container. Every sort has different performance characteristics that depend on a number of factors. They will each have a worst case / best case scenario.
i m taking about average type scenarios.. like to sort a link list having intergers
this smells like a test question.
Topic archived. No new replies allowed.