Quick Sort uses a partition element, such that the there are no larger entries to it's left and no smaller entries to it's right. It is in place, but not a stable sort.
Time complexity: O(NlgN)
Worst case : O(N2)
Following is the program:
Time complexity: O(NlgN)
Worst case : O(N2)
Following is the program:
No comments:
Post a Comment