Table:
Sorting Technique
|
Best
|
Average
|
Worst
|
Memory
|
Stable
|
Method
|
Others
|
Insertion sort
|
n
|
n2
|
n2
|
1
|
Yes
|
Insertion
|
|
Shell Sort
|
n
|
nlog2n or n3/2
|
Depends
|
1
|
No
|
Insertion
|
|
Binary Sort
|
n
|
nlogn
|
nlogn
|
n
|
Yes
|
Insertion
|
|
Selection Sort
|
n2
|
n2
|
n2
|
1
|
No
|
Selection
|
|
Heap Sort
|
nlogn
|
nlogn
|
nlogn
|
1
|
No
|
Selection
|
|
Bubble Sort
|
n
|
n2
|
n2
|
1
|
Yes
|
Exchanging
|
|
Merge Sort
|
nlogn
|
nlogn
|
nlogn
|
Depends
|
Yes
|
Merging
|
|
Quick Sort
|
nlogn
|
nlogn
|
n2
|
logn
|
Depends
|
Partitioning
|
|
No comments:
Post a Comment