Hi all,
Could any tell me what's the difference between the two kinds of sorting function listed below?
Do they all have nlogn time complexity? It looks like the later one is in the algorithm library while the first sort
seems to be defined in the list header file? Thanks a lot.
andCode:#include <list> ... ... list<int> ilist; ...... ...... ilist.sort();
Code:#include <algorithm> #include <vector> ... ... vector<int> ivec; ... ... ... ... sort(ivec.begin(), ivec.end());




Reply With Quote