Це відео не доступне.
Перепрошуємо.

20+ Sorting Algorithms Visualized - Disparity Chords (Reversed Inputs)

Поділитися
Вставка
  • Опубліковано 18 сер 2024
  • A Compilation of Sorting Algorithms handling reversed inputs - visualized with Disparity Chords
    Any ideas for interesting visuals? - tell me in the comments
    Featured algorithms:
    00:00 Radix Sort
    00:11 Merge Sort
    00:31 Tim Sort
    00:56 Gravity Sort
    01:02 Odd Even Sort
    01:40 Bubble Sort
    01:50 Shell Sort
    02:11 Shaker Sort
    02:23 Heap Sort
    02:42 Comb Sort
    02:55 Gnome Sort
    03:34 Cycle Sort
    03:46 Counting Sort
    03:56 Selection Sort
    04:10 Double Selection Sort
    04:19 Insertion Sort
    04:32 Bucket Sort
    04:39 Pigeonhole Sort
    04:47 American Flag Sort
    05:00 Quick Sort (Middle Pivot)
    05:05 Quick Sort (Dual Pivot)
    05:13 Bogo Sort

КОМЕНТАРІ • 96

  • @dragoncaretaker94
    @dragoncaretaker94 8 місяців тому +15

    8 bit sound effects!
    5:13 - preparing welding torch
    5:14 - using welding torch

  • @fletchqc9900
    @fletchqc9900 9 місяців тому +17

    odd even sort casually having a seizure

    • @Donu_tLover
      @Donu_tLover 7 місяців тому

      take alook at shaker sort

  • @Wmafateh
    @Wmafateh 8 місяців тому +7

    0:58 my favorite sort

  • @user-xy5yg6se1k
    @user-xy5yg6se1k 8 місяців тому +13

    how does it take that many tries for bogo to sort 12 elements???

    • @CompilerStuck
      @CompilerStuck  8 місяців тому +14

      Bogo Sort is not really a sorting algorithm. It shuffles the elements randomly, until they are in the right order

    • @sunanimatons
      @sunanimatons 3 місяці тому

      it takes 12 factorial tries on average, that number is 479001600

    • @algodoomarbleracing
      @algodoomarbleracing 3 місяці тому +5

      @@CompilerStuckit’s a joke sorting algorithm (they don’t sort jokes, but they are jokes)

    • @rsyvbh
      @rsyvbh 2 місяці тому +2

      It randomises every time and there are 12! permutations, so approximately 12! tries, so approximately 479001600

    • @m_affiliates
      @m_affiliates 2 місяці тому

      @@algodoomarbleracingI get that reference

  • @twixerclawford
    @twixerclawford 2 місяці тому +1

    Shell sort was an absolute bop

  • @GelatinousSSnake
    @GelatinousSSnake 4 місяці тому +1

    Quicksort sure lives up to its name

  • @akivabamberger7145
    @akivabamberger7145 8 місяців тому +2

    i am liking your sorting concepts a lot... wonder if there's a way to use a different synth for the sound

  • @mariasuazo3320
    @mariasuazo3320 7 місяців тому +1

    I commented this in my grandma's phone.

  • @JJVUltima
    @JJVUltima Місяць тому +1

    brain happy ❤

  • @Jirehsecondchannel
    @Jirehsecondchannel Місяць тому

    1:54 my favorite sort

  • @unrellated
    @unrellated 3 місяці тому +1

    My suggestion for a visualizer is to take that cube visualizer, and give each element a color based on it's 3D position in the fully sorted cube. Each axis will determine the red, green, and blue components of the color.

  • @Dancetothetower
    @Dancetothetower 9 місяців тому +3

    radix sort is a nonagon infinity fan i see

    • @chrisrodriguezm13
      @chrisrodriguezm13 8 місяців тому +1

      It’s base 10, so it’s a “decagon infinity fan”

  • @user-xt2gu4mt9k
    @user-xt2gu4mt9k 7 місяців тому

    Gravity sort looks a satisfying sort.

  • @chrisrodriguezm13
    @chrisrodriguezm13 8 місяців тому +3

    Comb sort is like shell sort but the shell is distracted and puts random waves everywhere, for me

  • @Andrew-jh2bn
    @Andrew-jh2bn 9 місяців тому +5

    I don't understand... Timsort on a reversed input is supposed to just reverse the data back in a single step. Is something wrong here?

    • @CompilerStuck
      @CompilerStuck  9 місяців тому +1

      Tim Sort uses a 'run' variable, typically between 32-64, to identify segments and sort them via insertion sort or reverse them if needed. Kuvina Saydaki illustrates this in his video ua-cam.com/video/FntVy6lPVyo/v-deo.htmlsi=X_Esad9SI-wV3mOH&t=435
      In my code, I set the value to 32, causing that pattern in the first half of the process ( 00:31 ) After this, merge sort takes over

    • @Andrew-jh2bn
      @Andrew-jh2bn 9 місяців тому +1

      @@CompilerStuck sounds like you're referring to the "minimum run length", where if a small run is shorter than this threshold it uses insertion sort to create a run at least that long before it moves on to merge sort. The algorithm should still detect a reversed array as a single run and flip it, however, as the whole point is detecting already sorted data as much as possible.

    • @CompilerStuck
      @CompilerStuck  9 місяців тому

      @@Andrew-jh2bn I basically used this implementation: github.com/argonautica/sorting-algorithms/blob/master/Java/TimSort.java

    • @Andrew-jh2bn
      @Andrew-jh2bn 9 місяців тому +1

      @@CompilerStuck ah, okay. This implementation is wrong then. It doesn't even attempt to find "natural runs", so it isn't Tim sort. It's just selection sort, then merge sort.

    • @CompilerStuck
      @CompilerStuck  9 місяців тому

      @@Andrew-jh2bn thanks for finding that, i'll look into it :)

  • @user-xy5yg6se1k
    @user-xy5yg6se1k 8 місяців тому +2

    0:57 why am i laughing?

  • @Unlimit-729
    @Unlimit-729 3 місяці тому

    Please🙏 how do you creating this videos?

  • @endersoncorrea8659
    @endersoncorrea8659 3 дні тому

    3:41
    4:13
    5:00
    👇🏼😁

  • @user-xt2gu4mt9k
    @user-xt2gu4mt9k 7 місяців тому

    Bogo sort is 12 numbers and elements.

  • @mitchkiggins9661
    @mitchkiggins9661 7 місяців тому

    whats tim sort?

  • @numberblocksminecraft
    @numberblocksminecraft 9 днів тому

    Gnome sort fast lol

  • @endersoncorrea8659
    @endersoncorrea8659 3 дні тому

    1:00
    2:35

  • @user-xt2gu4mt9k
    @user-xt2gu4mt9k 7 місяців тому

    Radix LSD sort is base 10, but...

  • @Osmone_Everony
    @Osmone_Everony 7 місяців тому +1

    Gravity sort at 0:56.

  • @user-xt2gu4mt9k
    @user-xt2gu4mt9k 7 місяців тому

    I think Bogo sort is the too much fastest.

  • @user-xt2gu4mt9k
    @user-xt2gu4mt9k 7 місяців тому

    20 sorts have no verify sorts.

  • @Markty07
    @Markty07 8 місяців тому +1

    Forgot stalin sort

  • @Scratchydoesmusic
    @Scratchydoesmusic 7 місяців тому

    Oeurrrrrrrrrrrrrr

  • @AndraesPasset
    @AndraesPasset 8 місяців тому

    watch at 2X speed