Professional Documents
Culture Documents
DSA Poster (1) Ansh
DSA Poster (1) Ansh
DSA Poster (1) Ansh
Shell sort: 1.Replacement for insertion sort, where it takes a long time
to complete a given task.
Shell sort is mainly a variation of Insertion Sort. In insertion sort,
2. To call stack overhead we use shell sort.
we move elements only one position ahead. When an element
3. when recursion exceeds a particular limit we use shell sort.
has to be moved far ahead, many movements are involved. The
4. For medium to large-sized datasets.
idea of ShellSort is to allow the exchange of far items. In Shell
5. In insertion sort to reduce the number of operations.
sort, we make the array h-sorted for a large value of h. We keep
reducing the value of h until it becomes 1. An array is said to be
h-sorted if all sublists of every h’th element are sorted.
1. Disadvantages: