In shellSort, 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 is sorted.
Array before sorting: 12 34 54 2 3 Array after sorting: 2 3 12 34 54
Please refer complete article on ShellSort for more details!
- Java Program for ShellSort
- Program for n-th even number
- C Program for ID3 Tagging
- C++ Program for QuickSort
- Program to print the given H Pattern
- C++ Program for Stooge Sort
- C++ Program for Comb Sort
- C++ Program for Topological Sorting
- C++ Program for Cocktail Sort
- C++ Program to find whether a no is power of two
- C++ Program for Pigeonhole Sort
- C++ Program for Cycle Sort
- Program to find Sum of the series 1*3 + 3*5 + ....
- C++ program to create a file
Improved By : ted1