Which type of sorting would you prefer??Quicksort or HeapSort?Even though both of them have complexities of (N log(N)), quicksort in some situations degenerates to O(n*n).But however heapsort is known to be less efficient than quicksort!!So which one to use in practice?Under what criteria would you choose between those 2??An example would be??

I'd use whatever internal structure the specified object has... Why waste your time reinventing something already there?

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.