Data Structures and Algorithms Shell Sort | Time Complexity | DSA Programming

Pubblicato il: 17 April 2024
sul canale di: Prashant Rana
58
5

Shellsort, also known as Shell sort or Shell's method, is an in-place comparison sort based algorithm. It can be seen as either a generalization of sorting by exchange or sorting by insertion. The method/algorithm works by sorting pairs of elements far apart from each other from a certain distance/gap, then progressively reducing the gap between elements to be compared.
After every Iteration we reduce the gap by n/2 and then compare the elements till we reach gap greater than 0.

And then at last we get the Sorted List of the Elements.

Shellsort Complexity -
Worst Case - Time Complexity - O(N^2)
Space Complexity - O(1)

#shellsort #dsalgo #datastructures #algorithm #java


In questa pagina del sito puoi guardare il video online Data Structures and Algorithms Shell Sort | Time Complexity | DSA Programming della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Prashant Rana 17 April 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 58 volte e gli è piaciuto 5 spettatori. Buona visione!