About 282,000 results
Open links in new tab
  1. Shell Sort - GeeksforGeeks

    Feb 20, 2025 · A Sorting Algorithm is used to rearrange a given array or list of elements in an order. For example, a given array [10, 20, 5, 2] becomes [2, 5, 10, 20] after sorting in increasing order and becomes [20, 10, 5, 2] after sorting in decreasing order. There exist different sorting algorithms for differ

  2. Shell Sort Algorithm with EXAMPLE - Guru99

    Sep 26, 2024 · Shell Sort Algorithm. The steps or procedure for the shell sort algorithm is as follows-Step 1) Initialize the interval value, h = n/2. (In this example, n is the size of the array) Step 2) Put all the elements within a distance of the interval h in a sub-list. Step 3) Sort those sub-lists using insertion sort. Step 4) Set new interval, h=h/2.

  3. Shell Sort (With Code in Python, C++, Java and C) - Programiz

    Shell sort is an algorithm that first sorts the elements far apart from each other and successively reduces the interval between the elements to be compared. In this tutorial, you will understand the working of shell sort with working code in C, C++, Java, and Python.

  4. Shell Sort Algorithm - Online Tutorials Library

    Shell Sort Algorithm. Following is the algorithm for shell sort. 1. Initialize the value of h. 2. Divide the list into smaller sub-list of equal interval h. 3. Sort these sub-lists using insertion sort. 4. Repeat until complete list is sorted. Pseudocode. Following is the pseudocode for shell sort.

  5. Shell Sort - Python - GeeksforGeeks

    Mar 3, 2025 · Shell Sort is an advanced version of the insertion sort algorithm that improves its efficiency by comparing and sorting elements that are far apart. The idea behind Shell Sort is to break the original list into smaller sublists, sort these sublists, and gradually reduce the gap between the sublist elements until the list is sorted.

  6. Shell Sort Algorithm In Data Structures (With Code Examples)

    Shell Sort Algorithm In Data Structures (With Code Examples) Shell Sort is an optimization of Insertion Sort that sorts elements at specific gap intervals, reducing the number of swaps. The gap is progressively reduced until it becomes 1, ensuring a nearly sorted array for final insertion.

  7. Shell Sort: Algorithm, Example, Complexity, Code - WsCube Tech

    Learn about Shell Sort Algorithm, Example, Complexity, and Code. Understand how this sorting technique works in this step-by-step tutorial.

  8. Shell Sort Algorithm - Python Examples

    Shell sort is an in-place comparison-based sorting algorithm. It generalizes insertion sort by allowing the exchange of items that are far apart. The algorithm starts by sorting pairs of elements far apart from each other, then progressively reducing the gap between elements to be compared.

  9. Shell Sort Algorithm - Tpoint Tech - Java

    Apr 24, 2025 · Shell sort is the generalization of insertion sort, which overcomes the drawbacks of insertion sort by comparing elements separated by a gap of several positions. It is a sorting algorithm that is an extended version of insertion sort. Shell sort has improved the average time complexity of insertion sort.

  10. Shell Sort Algorithm & Example (with C++ code) - FavTutor

    Aug 16, 2023 · Shell Sort is an in-place comparison-based sorting algorithm, where we divide the input into smaller subarrays and perform an insertion sort on each subarray. The key idea is to allow the exchange of elements that are far apart, thus …

  11. Some results have been removed
Refresh