how can a linked list can be sorted in less than O(n*n)
any algo ??

Recommended Answers

All 2 Replies

Can you insert the values the linkedlist contains into an array and then
sort it ?

no, only pointer to next element can be changed i.e in list node value of
element is not allowed to change.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.