Cycle Sort

preview_player
Показать описание
Visualization and "audibilization" of "Cycle Sort" algorithm.
The algorithm is an in-place transposition-based sorting algorithm, which always requires only the minimal number of _writes_ to the array.
It achieves this by calculating the rank of each element, and swapping it into the correct position.
The animation is slowed down during the video to give you time to see how the algorithm works.
Рекомендации по теме
Комментарии
Автор

From 1:25 - end:

[sorting intensifies]

BendenDrijver
Автор

What, no base drop? I really anticipated a base drop there in the end

Juurai
Автор

I never knew sorting algorithms oculd make really trippy music.

ilex_occulta
Автор

Seems super inefficient, but it sounds pretty!

AvindraGoolcharan
Автор

This is what the Predator's self-destruct sequence should have looked like

csmcstrsshd
Автор

This sort algorithm becomes heavy when the number is too large. (It took two and a half days to do it with the maximum number (2048))

* This is the number of days if you continue to work without changing the speed from 1.00 ms.

HalcyonMeteor
Автор

Yeah I'm making a dubstep remix of this

lenselement
Автор

I don't get why it needs to check the sorted elements.

MajorMandyKitten
Автор

1:35 Sounds like the sound of a charging laser from an old Sonic the Hedgehog game

nanchoparty
Автор

Put an element where it belongs and swap it for the element that took its place
Put that element where it belongs and swap it for the element that took its place
And repeat until you find a element the lowest, go to the element that is next to it and do the same thing
Like a cycle

Poopooproductions
Автор

You could optimize a lot through adding an additional dynamic array which would be the 'workspace' instead of accessing the original one this whole time.

MASTERO
Автор

This is one crazy algorithm. Never seen anything like it.

theLuigiFanProductions
Автор

It''s reverse selection sort but you're forbidden to rewrite the same element the second time.

EdwardNavu
Автор

1:35
What are you doing? Everything's already sorted!

Obstagoon
Автор

Whew. I feel like I need a cigarette after that ending.

joshzimmerman
Автор

Never seen this before. But I wouldnt ever want to use it, I dont

kyleinwis
Автор

this will sound strange but these help calm me down when im having a panic attack

gray
Автор

is this what it feels like to chew 5 gum?

raymontdabizach
Автор

Uhh, the ehole thing's already sorted? You only need to compare the non-green tiles tho?

ferociousfeind
Автор

Strong Super Mario World 8-4 dungeon vibes in this one!

robinwu