Skip to content

Commit 028f0d6

Browse files
Merge pull request TheAlgorithms#149 from tifa64/ReadMeUpdate
Updated README with the Shell sort
2 parents 54a16b1 + a80f00e commit 028f0d6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ __Properties__
116116
* Average case performance O(log n)
117117
* Worst case space complexity O(1)
118118

119+
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.
120+
121+
__Properties__
122+
* Worst case performance O(nlog2 2n)
123+
* Best case performance O(n log n)
124+
* Average case performance depends on gap sequence
125+
126+
###### View the algorithm in [action][shell-toptal]
119127

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

0 commit comments

Comments
 (0)