Skip to content

Commit ba301ef

Browse files
author
Mansour
committed
Updated README with the Shell sort
1 parent e44016c commit ba301ef

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,17 @@ __Properties__
6161

6262
###### View the algorithm in [action][selection-toptal]
6363

64+
### Shell
65+
![alt text][shell-image]
6466

67+
From [Wikipedia][shell-wiki]: Shellsort is a generalization of insertion sort that allows the exchange of items that are far apart. The idea is to arrange the list of elements so that, starting anywhere, considering every nth element gives a sorted list. Such a list is said to be h-sorted. Equivalently, it can be thought of as h interleaved lists, each individually sorted.
68+
69+
__Properties__
70+
* Worst case performance O(nlog2 2n)
71+
* Best case performance O(n log n)
72+
* Average case performance depends on gap sequence
73+
74+
###### View the algorithm in [action][shell-toptal]
6575

6676
[bubble-toptal]: https://www.toptal.com/developers/sorting-algorithms/bubble-sort
6777
[bubble-wiki]: https://en.wikipedia.org/wiki/Bubble_sort

0 commit comments

Comments
 (0)