Java Program for ShellSort
Last Updated :
10 Jun, 2022
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.
Java
class ShellSort {
static void printArray( int arr[])
{
|