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!
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Java Program for ShellSort
- VMware Interview Experience | Set 8 (On-Campus for MTS - Propel Program)
- Create Directory or Folder with C/C++ Program
- C Program to Swap two Numbers
- C Program for Bubble Sort on Linked List
- C Program to Sort an array of names or strings
- C++ program for Sorting Dates using Selection Sort
- Program to print an array in Pendulum Arrangement
- Program to sort an array of strings using Selection Sort
- C++ Program to concatenate two strings using Operator Overloading
- C++ Program to implement Symbol Table
- C Program for Bubble Sort
- C++ Program for Bubble Sort
- Java Program for Bubble Sort
- Python Program for Bubble Sort
- C Program for Insertion Sort
- C++ Program for Heap Sort
- Java Program for Heap Sort
- Python Program for Heap Sort
Improved By : ted1