Shell's Sort

  Рет қаралды 125,738

Timo Bingmann

Timo Bingmann

Күн бұрын

Пікірлер: 42
@jeanicehoffing8935
@jeanicehoffing8935 8 жыл бұрын
*Me when I try to play the piano
@zionj104
@zionj104 6 жыл бұрын
xD
@principalflultist2871
@principalflultist2871 4 жыл бұрын
Me: in place radix base 10 lsd sort
@lara-lima-p
@lara-lima-p 10 ай бұрын
You just need implement Shell's Sort hahaha
@5up3rp3rs0n
@5up3rp3rs0n 11 жыл бұрын
So shell sort is basically to compare two numbers from a fixed distance, and put it so that the bigger is on the right of the two numbers' original position, then divide the distance by a half and repeat, until everything's solved.
@mrninjagon270
@mrninjagon270 6 жыл бұрын
Close. What you just described is Comb Sort. Shell sort takes a subset of numbers a given distance apart from each other and performs an insertion sort on them, rather than simply swapping two values at a time.
@ahmidahmid9303
@ahmidahmid9303 6 жыл бұрын
shell sort is confusing not that simple when a gap is selected all the indexs which fall into the gap will be like separate array ! so it partitioned the array into parts ! when a match if found in that part every elemnt is "inserted" into the correct spot the "swap" process is a mean to insert the pointer will go down that array in loop wise direction until the smallest spot is found then it will return to position where the match is found to push the other bigger element into spot while doing so if smaller element matched the process is re-done not that simple to wrap around
@carmennegron958
@carmennegron958 6 жыл бұрын
Yes ands its the 2nd most effective sort if radix isnt in the sorting equation neither is time sort tim sort or gravity sort
@Franx-bd8om
@Franx-bd8om 5 жыл бұрын
gap = half length while gap not 0 do { for i = gap to length do { tmp = item at i j = i while j >= gap and item at j - gap > item at j do { item at j = item at j - gap } item at j = tmp } gap = half itself }
@raffimolero64
@raffimolero64 4 жыл бұрын
It actually works better if the gap is not exactly half length, the exact sequence isn't known and is bound by theory.
@vitex198
@vitex198 2 жыл бұрын
Shell sort is kind of like the equivalent of running a comb over the list over and over again until it's sorted.
@origamiscienceguy6658
@origamiscienceguy6658 11 ай бұрын
No, that's comb sort.
@vitex198
@vitex198 11 ай бұрын
@@origamiscienceguy6658 yeah I learned that comb sort was a thing in the year since I made that comment lol
@blargl121
@blargl121 11 жыл бұрын
Dubstep at its core.
@morgansullivan6397
@morgansullivan6397 11 жыл бұрын
These are all really cool but I wish there was a layman-friendly explanation for how each one works. It's fun trying to figure it out on my own but I am completely lost with this one. :(
@nessy3098
@nessy3098 5 жыл бұрын
T Orrent (ik this thread is 4 months old but still) that would make it impossible if the smallest value was on the right or if the biggest value was on the left. When used in a computer this would be a problem.
@zecuse
@zecuse 5 жыл бұрын
If you know what Insertion sort is, look up Comb sort. Shell sort is an Insertion based Comb sort (instead of Bubble based).
@smaybius
@smaybius 2 жыл бұрын
It's insertion sort, but the item skips a certain number of spaces back, and the gap decreases per pass. Once the gap is all the way small, it's plain insertion sort
@theAmazingJunkman
@theAmazingJunkman Жыл бұрын
It looks like comb sort, but its actually a hyper optimized, divide-and-conquer version of insertion sort
@want-diversecontent3887
@want-diversecontent3887 6 жыл бұрын
Shell sort: Insertion sort on gaps. You might think it's best to do 2^n, but you can do better than that.
@cmyk8964
@cmyk8964 2 жыл бұрын
Yeah, 2ˆn-1 seems to do better, and there’s, like, an experimentally-derived polynomial for it.
@FarmYardGaming
@FarmYardGaming Жыл бұрын
0:39 The original Bowser Castle theme
@legendgames128
@legendgames128 6 жыл бұрын
I learned that you compare 2 elements at a distance and sort them, move on to the next element and repeat until I get to the end of the array, make the comparison distance - 1 = new distance and so forth
@zionj104
@zionj104 6 жыл бұрын
Actually, you make the comparison distance half, not -1
@Tumbolisu
@Tumbolisu 4 жыл бұрын
Actually, you compare 2 elements at a fixed distance (aka gap size). If you had to swap them, compare with the one *back* that same distance away and repeat until no more swapping occurs. (Or you reach the beginning of the array.) Move on to the next element and repeat until you reach the end of the array. Then, chose a smaller gap size and repeat. Chosing a gap size is not trivial. Halfing the gap size each time is actually the worst you can do! An odd mix of seemingly arbitrary numbers has so far been the best choice ever found. (1, 4, 10, 23, 57, 132, 301, 701 and 1750. No further numbers are known.)
@groszak1
@groszak1 8 жыл бұрын
It's Incerpi-Sedgewick gap sequence, not Sedgewick. Multiple gap sequences may be named Sedgewick
@want-diversecontent3887
@want-diversecontent3887 6 жыл бұрын
Gnome shell sort. Like shell sort, but instead of applying insertion sort, you apply gnome sort.
@megamutant4539
@megamutant4539 4 жыл бұрын
Want - Diverse Content bubble shell sort
@juanvdvkuriboh
@juanvdvkuriboh 4 жыл бұрын
Pinche sonido tétrico que genera.
@user-cq8xj7ck2u
@user-cq8xj7ck2u 5 жыл бұрын
IT'S SORT ALGORITM
@ars7070
@ars7070 3 жыл бұрын
The final sound tho 😅😅
@Evy_SX
@Evy_SX 3 жыл бұрын
WAYTOODANK HOLY
@Ambipie
@Ambipie 4 жыл бұрын
Oh i see. Conch shells.
@smaybius
@smaybius 2 жыл бұрын
It's named after Donald Shell, the creator of the algorithm
@sirhawkjames
@sirhawkjames Жыл бұрын
massive chub watching that
@ramonaguilar8636
@ramonaguilar8636 6 жыл бұрын
Yes, this is Snadstorm-Darude
@shirinpatel9339
@shirinpatel9339 2 жыл бұрын
F
@albertovalsania8656
@albertovalsania8656 4 жыл бұрын
Meglio la musica dei Beatles
15 Sorting Algorithms in 6 Minutes
5:50
Timo Bingmann
Рет қаралды 25 МЛН
Bitonic Sort's Sick Beats
2:01
Musicombo
Рет қаралды 1,2 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Visualizing 70 Sorting Algorithms
29:24
Kuvina Saydaki
Рет қаралды 253 М.
BlinkenSort - The Sound of LED Sorting without Commentary
15:59
Timo Bingmann
Рет қаралды 13 М.
Obscure Sorting Algorithms
4:06
Sorting Stuff
Рет қаралды 700 М.
Oh, wait, actually the best Wordle opener is not “crane”…
10:53
THE STRONGEST ACID IN THE WORLD Fluoroantimonic acid
26:36
ChemicalForce
Рет қаралды 7 МЛН
Shell sort vs Insertion sort
6:23
udiprod
Рет қаралды 148 М.
Making Audio Waves That Look and Sound Like Things
4:19
Japhy Riddle
Рет қаралды 3,6 МЛН
50+ Sorts, Visualized - Swirl Dots
28:44
Musicombo
Рет қаралды 840 М.
Listening to Sorting Algorithms!
17:16
Kitty Beans
Рет қаралды 765 М.