Тёмный

50+ Sorts, Visualized - Reversed Inputs 

Musicombo
Подписаться 26 тыс.
Просмотров 215 тыс.
50% 1

Visit our community Discord: / discord
This bar graph visualization features 54 different sorting algorithms sorting inputs that are strictly decreasing.
*NOTE: Some algorithms with pathological inputs are skipped partway in this video to save time.
Try out the program featured in the video here: github.com/gaming32/ArrayV-v4.0

Наука

Опубликовано:

 

9 июн 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 683   
@Musicombo
@Musicombo 3 года назад
Join our community Discord! discord.com/invite/2xGkKC2
@DerpyNub
@DerpyNub 2 года назад
Rip no likes :(
@Apfelbaum454
@Apfelbaum454 4 года назад
You: Gnome Sort The Guy she tells you not to worry about: Optimized Gnome Sort
@SlashCrash_Studios
@SlashCrash_Studios 4 года назад
You've just been G'Nome Sorted
@thisrecordingsessiontm3633
@thisrecordingsessiontm3633 4 года назад
Her father: Odd-Even Sort
@Dinosaurs_with_laser_guns
@Dinosaurs_with_laser_guns 4 года назад
Lol 😹
@MrCubFan415
@MrCubFan415 4 года назад
(insert keemstar joke here)
@AtariWow
@AtariWow 4 года назад
Max Heap Sort
@roshambo4137
@roshambo4137 4 года назад
"Yo pass me the aux cord" "You better not play trash" *plays the In-Place Radix LSD Base 16 Sorting of reversed inputs with 2,048 numbers*
@alluseri
@alluseri 4 года назад
timecode ples
@alluseri
@alluseri 4 года назад
Timecode: 11:10
@GoldenGamerFox7272fromYT
@GoldenGamerFox7272fromYT 4 года назад
timestamp*
@lilmarionscorner
@lilmarionscorner 4 года назад
Alluseri timestamp: 11:10
@souplover6845
@souplover6845 4 года назад
My jam
@bryceg1020
@bryceg1020 4 года назад
Every other sort-uses givin values Gravity sort-yall mind if I just *c h a n g e t h e v a l u e s*
@bendaonfire0078
@bendaonfire0078 4 года назад
What if i set them all to the same value BOOM Sort skill 100
@tiporial
@tiporial 4 года назад
pizza mozzarella pizza mozzarella rella rella rella rella
@soulsilversnorlax1336
@soulsilversnorlax1336 3 года назад
@@tiporial this comment could be a big hit in Europe
@nunthenihtara608
@nunthenihtara608 3 года назад
9:46
@kunyoruyo
@kunyoruyo 5 лет назад
18:20 "ok let me fix that... wait... no... what's going on??"
@estergallardo3594
@estergallardo3594 4 года назад
This comment is not cool 😻💪👎🤙👎😽💪👎😻👎🙀👎😼🤞🎃👺👹
@michalmichl97
@michalmichl97 4 года назад
Ixpantenco it's pancake sort
@hollyleaf3941
@hollyleaf3941 4 года назад
@@estergallardo3594 And you're cool I suppose?
@Pallid3
@Pallid3 4 года назад
It's just robot
@dragonsdream4236
@dragonsdream4236 4 года назад
@@spedur3361 found the thirteen year old
@superscatboy
@superscatboy 4 года назад
Programmers in theory: look at all these options we have for sorting in different situations Programmers in practice: std::sort
@lychy645
@lychy645 4 года назад
superscatboy truu
@benjaminschaaf
@benjaminschaaf 4 года назад
Pigeonhole sort requires a limited range of integers (or equivalent). Using pigeonhole to sort a list containing just the numbers 1 and 1 trillion (1000000000000) requires 8TB of storage for example. It's great when you have a large set of integers in a small range, but that's almost never the case in practice.
@bathbombman
@bathbombman 3 года назад
quicksort when
@somenamelastnaammee52
@somenamelastnaammee52 3 года назад
_Arrays.sort();_
@wow-uf9ke
@wow-uf9ke 5 лет назад
pancake sort be like bruh
@dannadx3840
@dannadx3840 4 года назад
Man, not all sorting algorithms are designed to work with purely this type of data. Probably it was developed for something very specific
@dannadx3840
@dannadx3840 4 года назад
Yeah, it certainly is. I got time and checked. The only available operation is element flipping, so it just wasn't designed to work in this data type
@jr01theweeb
@jr01theweeb 4 года назад
18:20 The sort took 3 minutes
@-1f
@-1f 4 года назад
my mans be like bruh
@ilikeceral3
@ilikeceral3 4 года назад
dannad x what the heck is pancake sort for then?
@nejitentenlee21
@nejitentenlee21 4 года назад
I finally understand how gravity sort works! It doesn’t sort by moving, it changes the value of the item in each place until it’s the right value for that place
@Musicombo
@Musicombo 4 года назад
Yup! Uses a lot of scratch space in memory to do all that subtracting/adding, as well.
@jacobw1780
@jacobw1780 4 года назад
What is min heap sort then?!
@devinandcarrietotaldrama505
@devinandcarrietotaldrama505 4 года назад
@@Musicombo how about counting sort?
@RubyPiec
@RubyPiec 4 года назад
Can you give an example using numbers?
@uzairm3816
@uzairm3816 4 года назад
@@mrninjagon270 @chacha charlie well technically you can consider non descrete values to be discrete, but there is only 1 of each value. It would be really inefficient, not impissible for the counting sort
@sawyermerkle8835
@sawyermerkle8835 4 года назад
4:43 And here, you see a sorting algorithm sorting a reversed input to another reversed input...
@EJayy13
@EJayy13 Год назад
Min heap sort is just wrong.
@edwardclark6731
@edwardclark6731 Год назад
4:49 SIKE
@EJayy13
@EJayy13 Год назад
@@edwardclark6731 no
@mamf6175
@mamf6175 4 года назад
Set Playback Speed to 2 to improve the algorithms
@dirtydan9785
@dirtydan9785 4 года назад
big brain moment
@EJayy13
@EJayy13 2 года назад
Or 720p60
@maurolionelmisjuegosyo940
@maurolionelmisjuegosyo940 2 года назад
No
@demonschnauzer1555
@demonschnauzer1555 3 года назад
17:21 Introsort: Well, I just completed my task, better celebrate!
@caseyashworth8016
@caseyashworth8016 4 года назад
Smooth sort: is called smooth sort Also smooth sort: 5:24
@yonka-cola8792
@yonka-cola8792 4 года назад
Spiky
@louispipercarson9630
@louispipercarson9630 4 года назад
pointy sort
@givrally7634
@givrally7634 4 года назад
I was just about to say that ! It's literally the least smooth of all, maybe excluding heap sort variants.
@brayden205
@brayden205 4 года назад
Casey Ashworth I think it’s called smooth sort due to how quick and clean the sort itself is
@koibuprofen
@koibuprofen 3 года назад
Ru²Kanga clean?
@firstnameiskowitz8493
@firstnameiskowitz8493 4 года назад
16:27 when you have five minutes left to finish all the questions in your exam
@CJBoxyeet
@CJBoxyeet 2 года назад
lmao that actually made me nose laugh
@victorfunnyman
@victorfunnyman 2 года назад
nose expiration ye lmao, it got quick so weirdly
@LunarLambda
@LunarLambda 5 лет назад
poor pancake sort
@jacobw1780
@jacobw1780 4 года назад
18:22
@amethystt727
@amethystt727 4 года назад
It tried, but it just wasn't enough
@uklu
@uklu 4 года назад
Still faster than bubble sort
@sonatuh
@sonatuh 2 года назад
It's a joke sort so its born to be trash unfortunately
@StormTheSquid
@StormTheSquid 2 года назад
It's just showing off.
@Tekkwin
@Tekkwin 4 года назад
is this how they made earthbound sounds
@Musicombo
@Musicombo 4 года назад
Hahaha :P
@jacobw1780
@jacobw1780 4 года назад
No.
@Pedro270707
@Pedro270707 4 года назад
@@jacobw1780 r/woooosh
@jacobw1780
@jacobw1780 4 года назад
@@Pedro270707 O H N O
@trashmann1081
@trashmann1081 4 года назад
pk algorithm
@ThomasBomb45
@ThomasBomb45 3 года назад
2:12 looks like a rotating 3D image. Nice
@draganahajdin404
@draganahajdin404 2 года назад
It does!
@err0rcube115
@err0rcube115 2 года назад
Omg it does lol
@victorfunnyman
@victorfunnyman 2 года назад
true tho
@JetFalcon710
@JetFalcon710 10 месяцев назад
Yeah, it's like watching someone rotating an empty box
@colouur4778
@colouur4778 4 года назад
9:57 wait that’s illegal
@EXA1024_
@EXA1024_ 3 года назад
ikr
@dr.jacksonbright5723
@dr.jacksonbright5723 3 года назад
Imagine using silly sort on a comically small set, thinking “maybe it’s silly’s time to shine,” only for your computer to freeze for seventeen and a half seconds before presenting a sorted set
@californium-2526
@californium-2526 2 года назад
A set of 256: 17,5s A set of 2048: 1m41,6s or something
@Musicombo
@Musicombo 2 года назад
It doesn't work like that; it's not linear complexity. 2,048 items would probably take over a day.
@californium-2526
@californium-2526 2 года назад
@@Musicombo Ah, the beauty of O(n^(log n)) (didn't know that it was that bad while I was making that comment)
@BigFatWedge
@BigFatWedge Год назад
Silly Sort took 572 MILLION COMPARISONS to sort 256 items!! XD
@icebearpl188
@icebearpl188 4 года назад
When bad sort gets to be one of the fastests
@jacobw1780
@jacobw1780 4 года назад
Good sort
@katalysator3431
@katalysator3431 4 года назад
well it doesnt use as much numbers so...
@diamboy
@diamboy 5 лет назад
Base 16 looks like it’s trying to say something
@dusaprukiyathan1613
@dusaprukiyathan1613 4 года назад
Sounds like it's trying to say something; not sure whether that's what you meant to say or just what I think
@jonasferraz
@jonasferraz 4 года назад
11:11
@MrtinVarela
@MrtinVarela 5 лет назад
Batcher's bitonic: *"yes, but actually... no"*
@mateuszodrzywoek8658
@mateuszodrzywoek8658 3 года назад
it does make some pretty fire beats if i say so myself
@NXTangl
@NXTangl Год назад
That's just what happens when you're literally the opposite of adaptive!
@jyosongurung5583
@jyosongurung5583 Год назад
That’s at 12:58
@jyosongurung5583
@jyosongurung5583 Год назад
Also what the $%#&?????
@Fireball7428
@Fireball7428 Год назад
And then there's Pancake sort at 18:20.
@pencrows
@pencrows 4 года назад
Patience Sort: get your popcorn and take a seat, we're gonna be here a while Also Patience Sort: 2 seconds
@edwardclark6731
@edwardclark6731 2 года назад
thats terribly inefficient if it was real time
@glitchy9613
@glitchy9613 3 года назад
26:34 So we've made the pattern just the reversed version of what the order is supposed to be, so its easier for you to sort them. Less Bogo Sort: Ok...
@JiMMy-xd8nu
@JiMMy-xd8nu 3 года назад
omg yes
@ojd9145
@ojd9145 Год назад
Yeah
@Coolmanerik_Z
@Coolmanerik_Z Год назад
relatable
@aether-music
@aether-music 4 года назад
16:24 "Nope, I'm done"
@maxhaibara8828
@maxhaibara8828 4 года назад
Bogo Sort can be the fastest sorting algorithm, with the chance of happening of 1/n!
@DragoStar
@DragoStar 3 года назад
I may be late but is that 1 over n factorial or is it an excited 1 over n ?
@MineSomeCraftPoo
@MineSomeCraftPoo 3 года назад
@@DragoStar this is probably a joke, but hey, anyway it's n! since thats the total number of ways to order n elements
@almogz9486
@almogz9486 3 года назад
@@DragoStar 1 over n factorial
@asheep7797
@asheep7797 2 года назад
@@DragoStar 1 over nfactorial
@Digephil
@Digephil 4 года назад
2:50 my guinea pigs when I'm cutting bell peppers.
@nekomimicatears
@nekomimicatears 4 года назад
My Guinea pigs in general
@Zyn_Shi
@Zyn_Shi 4 года назад
I’m glad someone had the same idea!
@chimaudeh5159
@chimaudeh5159 4 года назад
Love how the smooth sort (5:24)is in no way smooth
@bingobeego
@bingobeego 10 месяцев назад
LMAO
@JetFalcon710
@JetFalcon710 10 месяцев назад
Smooth sort actually roughened up the surface of the triangle
@FM-lc6hp
@FM-lc6hp 4 года назад
i really love 10:36 so much! easy algorithm and yet best performance~
@californium-2526
@californium-2526 2 года назад
Ah yes. 573 microseconds ERT, just behind of TimSort (391 microseconds ERT, 16:32) It's a storage and memory (?) hog though.
@jeremyaster7470
@jeremyaster7470 9 месяцев назад
pigeonhole sort just built different
@entredus7910
@entredus7910 4 месяца назад
elements 1 and a really, really big number
@galimantis190
@galimantis190 4 года назад
10:29 _What._
@twoarrow9134
@twoarrow9134 4 года назад
“yeet”
@thatcrystalpie
@thatcrystalpie 3 года назад
The algorithms have learned to count
@lillie3029
@lillie3029 3 года назад
Galimantis 10:37 *
@wenirlicker6808
@wenirlicker6808 3 года назад
Count Count Sort
@JNSStudios
@JNSStudios 3 года назад
H O W
@deffinatalee7699
@deffinatalee7699 4 года назад
12:58 Batcher needs to make up his mind
@ninja3212
@ninja3212 4 года назад
TimSort be like: "Y'all mind if I just flip the array?"
@californium-2526
@californium-2526 2 года назад
Est. Real Time: 391 microseconds.
@LindenF
@LindenF 4 года назад
5:25 I’m sure that is not smooth it looks sharp
@screamsinrussian5773
@screamsinrussian5773 4 года назад
no
@brayden205
@brayden205 4 года назад
I’m pretty sure it’s called that due to the sporting not being sloppy or confusing as others
@edwardclark6731
@edwardclark6731 2 года назад
smooth heaps: *am i a joke to you?*
@edwardclark6731
@edwardclark6731 Год назад
Future me: *Yes. Yes you are.*
@Lonely_Wiz
@Lonely_Wiz 4 года назад
21:34 flight of thr bumblebee
@beanoptodon
@beanoptodon 3 года назад
I like it when the red line is stuck focusing on one point like it's working super diligently to sort the things in the area, then it goes to another place and starts again
@Hjerpower
@Hjerpower 4 года назад
I like how min heap sort went through the whole heapification process to only end up back where it started
@BigFatWedge
@BigFatWedge Год назад
See, YOU can see all the items at once , but the algorithm cant. It can only compare two items at a time. To us, it just looked like Min Heap Sort turned a reverse array back into a reversed array. But to Min Heap Sort, it turned an array of didn't know was reversed, to an array it DID know was reversed.
@ZA-mb5di
@ZA-mb5di 4 года назад
17:21 sounded like All Star for a second
@fridaykitty
@fridaykitty 4 года назад
nice 69th like
@pannesterpants3008
@pannesterpants3008 3 года назад
Omg ur right
@Jack-lp3gc
@Jack-lp3gc 4 года назад
so is no one gonna point out that min heap sort did a bunch of stuff to the inputs only to get right back to where it started and then flip it around
@FusionArmorX
@FusionArmorX 4 года назад
12:27 The sound of 100, 500, and then 1000 point enemies being destroyed.
@TheEgglet
@TheEgglet 3 года назад
2:17 it looks like a hole in a box lol
@quillenkai6714
@quillenkai6714 4 года назад
I thinks it's absolutely amazing that bogo sort with 8 inputs took nearly 10x as long (estimated) as quicksort with 2048 inputs
@Hasde_dfs
@Hasde_dfs Год назад
And that’s without even talking about pigeonhole sort
@kingsley.
@kingsley. Год назад
@@Hasde_dfs tim sort
@rexperverziff
@rexperverziff 11 месяцев назад
@@Hasde_dfstime stamp?
@locrianphantom3547
@locrianphantom3547 10 месяцев назад
Wait til you see BOGOBOGO sort…
@CanYouPeeInYourAss
@CanYouPeeInYourAss 9 месяцев назад
​@@locrianphantom3547with 10 inputs!!!!
@EdKolis
@EdKolis 2 года назад
I like the ones that don't even maintain the integrity of the original data but somehow put it all back at the end, like the gravity sort
@MishaG4mer
@MishaG4mer 4 года назад
Counting sort: I am speed Patience sort: You are quick, But im faster
@MishaG4mer
@MishaG4mer 4 года назад
Time Sort: Hold my beer
@MishaG4mer
@MishaG4mer 4 года назад
TimSort: Try me bitches
@finniko1995
@finniko1995 4 года назад
Pigeonhole Sort: Boom, done! What now?
@MishaG4mer
@MishaG4mer 4 года назад
Pancake sort: YOU DARE OPPOSE ME MORTAL Hold on gotta scan the algorithm 69420 times before confirming its sorted
@ConsarnitTokkori
@ConsarnitTokkori 4 года назад
pancake sort: merry christmas 2016!
@Guinea.Pig-Gaming
@Guinea.Pig-Gaming 4 года назад
odd-even sort looks like a 3d structure changing shape.
@DogeisCut
@DogeisCut 4 года назад
It does tho
@FunctionGermany
@FunctionGermany 4 года назад
Batchers Bitonic Sound be like: "now i know this might look like the exact same thing but just hold on for a bit"
@ATtiny13a-PU
@ATtiny13a-PU 4 года назад
11:10 - is drop from dubsteb
@taureon_
@taureon_ 4 года назад
which
@screamsinrussian5773
@screamsinrussian5773 4 года назад
dubsteb
@Obviary
@Obviary 4 года назад
3:02 if you listen closely it almost sounds like megalovania
@attack54
@attack54 4 года назад
Obviary god damnit take my like
@amogus7
@amogus7 3 года назад
42th
@sameendusk2623
@sameendusk2623 4 года назад
16:32 timsort's not having any of this reverse bullshit
@bigloudnoise
@bigloudnoise 2 года назад
I'm surprised Pancake Sort didn't see the obvious solution of just flipping the entire stack once to get it in the correct order. I presume there's a limitation to the algorithm (which I am unfamiliar with) that forces it to start inside the stack, thus preventing it from just flipping the whole thing in one shot.
@BigFatWedge
@BigFatWedge Год назад
Pancake Sort searches for the largest item in the remaining list, and then reverses the part of the list ranging from the first item in the list to the largest item. For example, if the largest item is the 50th item, reverse the order of the first 50 items. This puts the largest item(in the remaining list) at the front of the remaining list. Then you reverse the ENTIRE remaining list, putting the largest item in the last position in the remaining list. Then redesignate the last(largest) item as part of the sorted list. Then do it again on the remaining list, until it reaches a length of 1 item. It's basically Selection Sort, but made much worse for no reason. So, in this case, on the first iteration, it finds the largest item(already the first, as the list is in descending order), then reverses the list from the first item to the largest item(since this is a list of 1 item, nothing happens), then reverses the entire list, which sorts it. But the algorithm doesn't check if the list is sorted, it just searches for the largest item in the remaining list. Because it reversed the entire array, putting it in ascending order, the largest element in the remaining list is at the end, making the algorithm reverse the entire list to put the largest item at the beginning, then reverse it AGAIN to put it at the end and thus sort it. But it isn't checking, every time it reverses the array, if it's sorted. In short: although it sorts the list in "one shot," it doesn't KNOW if did that, cause it didn't check. Hope that answers your question.
@takedLLC
@takedLLC 4 года назад
Is no one going to mention that at one point gravity sort had all of the numbers the same?
@ironoat
@ironoat 4 года назад
You should look up gravity sort. It's a really cool concept. You could build a physical system using it to sort in linear time. It is also called bead sort
@Choinkus
@Choinkus 4 года назад
It's pretty cool but unfortunately it's not very efficient
@dezcubing5844
@dezcubing5844 4 года назад
I saw from another comment that it changes all the values until its the right value for the place
@cephalosjr.1835
@cephalosjr.1835 4 года назад
Choinkus Gravity sort is only good on specialized hardware. Of course, if you implement it on hardware, it’s very fast.
@takedLLC
@takedLLC 4 года назад
@@ironoat I know
@SKyrim190
@SKyrim190 4 года назад
Some of those look to me like (1) read the list (2) print the sorted list is the whole algorithm. I can not even begin to guess what is going on. Also, silly sort looks like a merge sort that got neurotic and is afraid the list might change when he is not looking
@ThomasBomb45
@ThomasBomb45 3 года назад
They use auxiliary data structures. The visualization really should show them
@nathanzotov1160
@nathanzotov1160 4 года назад
batchers bitonic be like: Ok yeah, go there, uh huh, wait stop! Go back, go back. go right there. Yeah. WAIT NO COME BACK HERE!
@thatcrystalpie
@thatcrystalpie 3 года назад
Pigeonhole sort is like "I SEE THROUGH THE LIES OF THE *reversed inputs"*
@Caseofgames
@Caseofgames 3 года назад
9:57 Perfectly balanced, as all things should be.
@thatonecountryballanimator
@thatonecountryballanimator Год назад
9:58
@Caseofgames
@Caseofgames Год назад
@@thatonecountryballanimator It's already unbalanced at 9:58.
@thatonecountryballanimator
@thatonecountryballanimator Год назад
Whoops, sorry.
@MayorVideo
@MayorVideo 4 года назад
7:52: the best one
@mikaroni_and_cheez
@mikaroni_and_cheez 3 года назад
Merge sort is kind of how people sort things, you group similars together and then pick out the similarities to those groups and so on until 0 to 100 are lined up
@IronBoy-hf2lp
@IronBoy-hf2lp 4 года назад
@ Pancake Sort: BRUUUUH WHAT ARE YOU DOOOOOOING
@niku4154
@niku4154 4 года назад
Nobody: Old PCs when you put in a CD: 18:13
@wladfan
@wladfan 3 года назад
Whoops! You have to put the CD in your computer
@mcbattery856
@mcbattery856 4 года назад
Where's that comment with the list of sorts?
@busher6004
@busher6004 4 года назад
Gone Reduced to atoms
@marcosgreg9983
@marcosgreg9983 4 года назад
Seems not sorted yet
@buurk
@buurk 4 года назад
11:11
@Memerath
@Memerath 3 года назад
the time, the sort, the mathematical perfection of it all
@Giyga
@Giyga 2 года назад
I find pancake sort very funny when it starts swapping rapidly towards the end
@brandonklein1
@brandonklein1 4 года назад
Really shows the difference between n^2 vs nlog(n)
@relt_
@relt_ 4 года назад
i love how batcher's odd-even merge sort just *transitions* the values
@notquitebleu
@notquitebleu 4 года назад
Everyone gangsta til odd-even sort makes the sorting 3D
@tizianodellafazia2309
@tizianodellafazia2309 4 года назад
Ahhh yes it's this time of the year.... youtube strikes again with that algoritm stuff
@nordern1
@nordern1 4 года назад
The algorithm wants to show off its family
@mistycremo9301
@mistycremo9301 2 года назад
I wish you would do a bit of color coding for what state the sorts are actually in- say green for "known to be sorted", and maybe separate colors for each layer of heapsort's heap
@RichConnerGMN
@RichConnerGMN Год назад
nice pfp
@EchoFaustMusic
@EchoFaustMusic 3 года назад
I always found it strange why block sort algorithm seem to, for lack of a better word, carry numbers along while sorting.
@Musicombo
@Musicombo 3 года назад
That's their internal buffer!
@h0verman
@h0verman 5 лет назад
its cool how with starting reversed some sorts approach a fractal pattern initially
@zapdragon5942
@zapdragon5942 5 лет назад
Then there's Odd-Even
@icebearpl188
@icebearpl188 4 года назад
Base16 made some sort of rbg boss battle theme intro
@kirbycreep
@kirbycreep 4 года назад
@@icebearpl188 some *_sort_*
@Remon_
@Remon_ 4 года назад
5:26 sounds like pulling off a long piece of plastic on a new surface
@AlisterCountel
@AlisterCountel 5 лет назад
This made me curious, is there an algorithmic way to find the specific “worst case scenario” for any given sort? Between this and the already sorted inputs, it certainly seems like there are some non-random arrangements which take excessive amounts of time compared to a normal sort.
@Musicombo
@Musicombo 5 лет назад
It's probably more often that people have just come across worst cases for these sorts, but I'm not sure about an algorithm. I would be curious about that, too!
@erikprantare696
@erikprantare696 5 лет назад
I'll try to prove that there doesn't exist a general algorithm for that, in a similar way that you prove that there is no general way to solve the halting problem: Assume that there is an algorithm A(s, i), that tells you whether an input i is the worst case input for a given sorting algorithm s Construct sorting algorithm S, that given A(S, i), will sort using quicksort if i is the worst case input, and otherwise use bogosort (or any other algorithm that is going to be slower than quicksort) But, this means that for I = worst case input for S, A(S, I) /must/ say that I is not the worst case. Therefore, there exists no general algorithm A that can determine if a given input is the worst case scenario for a given sort. I hope this makes sense :)
@Musicombo
@Musicombo 5 лет назад
@@erikprantare696 That does, thank you so much!!
@slycordinator
@slycordinator 5 лет назад
"Between this and the already sorted inputs, it certainly seems like there are some non-random arrangements which take excessive amounts of time compared to a normal sort." While that seems true, there are exceptions. For instance, insertionsort is faster for "nearly-sorted" and "completely sorted" lists than for ones that have random data. In fact, it's why one method used to speed up something like quicksort is to simply do nothing when partitions are fairly small, then when that whole thing completes, run insertionsort on that mostly-sorted list. edit: What I'm getting at is that the same non-random arrangements don't affect each sort the same way.
@Fera-gr5mm
@Fera-gr5mm 4 года назад
Brute-force algorithm might go through all n! permutations and measure it manually.
@ONS0403
@ONS0403 4 года назад
Quick sort is the one true god... considering its performance and how quick it is to write
@romajimamulo
@romajimamulo 4 года назад
Except this is actually the worst case scenario
@Fera-gr5mm
@Fera-gr5mm 4 года назад
@@romajimamulo Only if it was choosing the last/first element. In this case, the middle element is the median, so this is pretty effective.
@romajimamulo
@romajimamulo 4 года назад
@@Fera-gr5mm That is true.
@pestermaster7617
@pestermaster7617 Год назад
Batcher's bitonic sort: shakes a bit here and there, decides that it is wrong, Puts it back, and then decides that it prefers the list sorted.
@midlifehemi88
@midlifehemi88 4 года назад
Time sort: Estimated Real Tome: 8,192 ms That’s only 8.1 seconds, but it feels like eons compared to the rest of the sorts... Edit: never mind. Silly sort and slow sort killed it. Lmao.
@theairaccumulator7144
@theairaccumulator7144 4 года назад
Yes, because time sort works by waiting in many threads at once.
@jacobw1780
@jacobw1780 4 года назад
Tournament sort?
@lithiumwyvern_
@lithiumwyvern_ 4 года назад
That's because time sort isn't a real sorting algorithm. As the air accumulator said, time sort is just a horrible abuse of the system's scheduler - it creates one thread for every element, makes them wait (value of the element × 4) milliseconds then push the element onto the end of the output array, then insertion-sorts that array.
@MauveDash
@MauveDash 4 года назад
Slow sort
@nick1752
@nick1752 3 года назад
@@lithiumwyvern_ ngl that's kinda genius
@CatFace8885
@CatFace8885 7 месяцев назад
Pancake sort constantly reversing the already sorted array over and over not knowing any better is such a moment
@entropic-decay
@entropic-decay 4 года назад
odd-even sort: *just turns it around in 3D*
@ilikeceral3
@ilikeceral3 4 года назад
Why am I watching sorting videos when I don’t even know math
@jamesallen74
@jamesallen74 2 года назад
No matter what the sorting video is, Radix LSD Base 4 NEVER fails to impress me in terms of awesomeness and beauty. :)
@Fireball7428
@Fireball7428 Год назад
And it also sounds great.
@MsZiomallo
@MsZiomallo 4 года назад
Pigeonhole sort (10:37): *I AM SPEED*
@Gamesmarts194
@Gamesmarts194 4 года назад
“Impractical sorts” lol
@timetree4124
@timetree4124 3 года назад
5:23 Selection Sorts: Smooth Sort Looks: *Rough*
@Drachi-
@Drachi- 3 года назад
2倍速で聴くとめちゃくちゃ気持ちいいです! I love listening to it at double speed.
@What-thaW
@What-thaW 4 года назад
5:26 Cha cha real smooth
@MaximG.
@MaximG. 4 года назад
11:14 - this reminds me of Metroid Prime title screen for some reason
@The4stro
@The4stro 4 года назад
stable quick sort was like trying to start an engine, and it finally starting
@52.yusrilihsanadinatanegar79
@52.yusrilihsanadinatanegar79 3 года назад
Batcher's Bitonic Sort "wait, let me merge it in" "oh wait, there is a problem" "ok then, i'll reverse it back to fix that problem" "oh wait, it's the input" "let's merge it all to-" "r e v e r s e a n d m e r g e"
@pinguin4898
@pinguin4898 3 года назад
heap sort is extremely powerful here because it's already all in a heap
@nouche
@nouche Год назад
Is it me or did Bogo Sort get quite lucky there?
@NStripleseven
@NStripleseven 4 года назад
Batcher's bitonic sort undoes itself many more times than is necessary. 13:00
@josephjackson1956
@josephjackson1956 4 года назад
4:30 you would think the min heap sort would figure it out super quick but noooo... 🙄🙄🙄
@woooooooooooooooooooooooo
@woooooooooooooooooooooooo 3 года назад
it's trying is best
@theallknowingsause8940
@theallknowingsause8940 3 года назад
Why are you being so rude to min heap sort?
@blendyboi5023
@blendyboi5023 3 года назад
Leave min heap sort alone 🥺
@ch1995
@ch1995 4 года назад
08:08 Visualized merged sort reminds me of 2048 XD
@jacobw1780
@jacobw1780 3 года назад
Same
@stephengnb
@stephengnb 3 года назад
Are you from there future? What's it like in 2048?
@stephengnb
@stephengnb 3 года назад
So when I play 2048, I'm just being a very slow sorting algorithm?
@jacobw1780
@jacobw1780 4 года назад
They really improved radix base 16 from deafening noises to sorting data. Very creative
@LandonM_Earth
@LandonM_Earth 2 года назад
0:33 looks like a reversed image of the original zooming out of existence
@korriannavanheart8911
@korriannavanheart8911 10 месяцев назад
Dreams be like: you must go up these stairs The stairs:
@AntonDiaz7
@AntonDiaz7 9 месяцев назад
18:21 Pancake Sort: I can finish it fast but I'd prefer to torture it.
@sharpesttoolintheshed492
@sharpesttoolintheshed492 3 года назад
Gravity sort be like: 1) have values to sort 2) look at them 3) ??? 4) profit
@californium-2526
@californium-2526 2 года назад
A slow one though. Pigeon hole sort, counting sort and TimSort would have fit.
@raine6813
@raine6813 3 года назад
12:57 "maybe if i put this he- no that dosent work. maybe if i did thi- no that dosent work either. maybe if i jus- oh god now i gotta start all over..."
@randomyoutubecommenter2863
@randomyoutubecommenter2863 3 года назад
For a lot of these, this is actually worst case scenario
@KingofJ95
@KingofJ95 4 года назад
Silly Sort: Who are you? Merge Sort In Place: I'm you, but stronger.
@VoidGravitational
@VoidGravitational 11 месяцев назад
Min Heap Sort: Oops why did i do that lets revert that Also Min Heap Sort: *reverses the bars*
@devrim6
@devrim6 4 года назад
Great video! I just have a question: how long did it take for all of this to complete?
@SHIN2024_official
@SHIN2024_official 2 года назад
5:11 Weak heap sort: I AM NOT WEAK
@sumandbastitv2606
@sumandbastitv2606 2 года назад
Strong heap sort?
@AsaNole
@AsaNole 4 года назад
10:31 10:37 Radix starts at 10:41 16:32
@californium-2526
@californium-2526 2 года назад
The fastest sorting algorithms ever: TimSort, Pigeonhole sort and Counting sort (.391, .573 and .889 milliseconds estimated real time, respectively). In practice though, only TimSort is in wide use (i.e. Python).
@nouche
@nouche Год назад
Quick Sort is known to be pretty bad in this case, as well as when it’s already pretty much in order. On the contrary, Heap Sort(s) are known to be pretty darn good in every case.
@BigFatWedge
@BigFatWedge Год назад
Well, a reversed array is necessarily a heap, so Heap Sorts already have half their work done for them in this case. I imagine they don't do so well if the array is sorted/is close to being sorted, because an array in ascending order is what might be dubbed an anti-heap--no part of the heap is correct. Quick Sort only struggles because usually, it's programmed to just choose the last item as the pivot, which is bad If that's the biggest/smallest item. If you code it to just pick a random item from the list as a pivot, though, it performs just as well as any other time. Also, Heap Sort is the worst O(n log n) sort on average, and Merge Sort does better in "all cases." So you're wrong .
@bingobeego
@bingobeego 10 месяцев назад
​​@@BigFatWedgeigeonhole? Or even timsort
Далее
50+ Sorts, Visualized - Scatter Plot
30:21
Просмотров 735 тыс.
Я ТВОЙ ОТЕЦ #большоешоу
01:01
Просмотров 169 тыс.
90 Sorts on Large Inputs - Scatter Plot
1:01:27
Просмотров 106 тыс.
AI learns to play 2048
11:11
Просмотров 10 млн
NeXTSTEP Release 3: A Demonstration with Steve Jobs
35:07
*SEIZURE WARNING* Pushing Sorts to their Limits
59:06
CONCURRENCY IS NOT WHAT YOU THINK
16:59
Просмотров 85 тыс.
*SEIZURE WARNING* Pushing Sorts to Even Greater Limits
1:04:40
8 Sorting Algorithms in Minecraft
3:38
Просмотров 897 тыс.
POPVIBE V5000 setup ASMR
0:26
Просмотров 714 тыс.
Will the battery emit smoke if it rotates rapidly?
0:11
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00