From ba301ef73e58246cf4790498fde7841bed2e2f73 Mon Sep 17 00:00:00 2001 From: Mansour Date: Wed, 4 Oct 2017 19:01:50 +0200 Subject: [PATCH] Updated README with the Shell sort --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 4b563445..3b98906a 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,17 @@ __Properties__ ###### View the algorithm in [action][selection-toptal] +### Shell +![alt text][shell-image] +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. + +__Properties__ +* Worst case performance O(nlog2 2n) +* Best case performance O(n log n) +* Average case performance depends on gap sequence + +###### View the algorithm in [action][shell-toptal] [bubble-toptal]: https://www.toptal.com/developers/sorting-algorithms/bubble-sort [bubble-wiki]: https://en.wikipedia.org/wiki/Bubble_sort