(potential seizure warning) Base 10 in-place MSD radix sorting algorithm on ArrayV

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ค. 2021
  • It says base 4 for some reason when it's actually base 10. The speed was set to 1.25 instead of the usual 0.75.
    This time, I have an actual sorting thread in the style of Musicombo's streams, provided by Gaming32 via Discord. Download it here at pastebin.com/jJT7mRSt and move it into src/threads/ in the ArrayV folder, then press CTRL+F and type "timsort" and replace "timsort" in the script with whichever algorithm you want to use. Then, open up src/prompts/SortPrompt.java and add the following code in loadSortThreads():
    categorySortThreads.put("Some sort thread", new RunSomeSortThread (ArrayVisualizer));
    Then, download and move this pastebin.com/LpUf38B8 into src/sorts/. Then, open up your terminal (command prompt or Powershell on Windows), CD to the ArrayV folder, then enter "ant".
    This thread is modified to include all the available shuffles.
    While LSD radix is a linear algorithm, MSD radix is a divide and conquer algorithm in the same way as quicksort, but instead of making partitions of what's greater than and less than the item it picks as a pivot, it makes partitions of the values of the highest digit of each number and then recursively repeats the process per partition by going down a digit. For this implementation of in-place MSD radix, it's O(n) best, O(n * b logbase(b) max) average, and O(n^2) worst cases, O(b + logbase(b) n) memory, and unstable. b=base, which in this case is 10, is the number of partitions it makes at a time. LSD means "least significant digit", meaning it starts at the lowest digit, sorts the items by that digit, then repeats the process as it goes up a digit. MSD means "most significant digit", meaning it goes the opposite direction, meaning starting from the highest digit, then sorting the items by that digit, then repeating the process as it goes down a digit.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 23

  • @felipearrais5415
    @felipearrais5415 2 ปีที่แล้ว +1

    This really helps to understand how the algorithm works. Really cool.

  • @truongquangduylop33
    @truongquangduylop33 13 วันที่ผ่านมา

    Already sorted is cursed

  • @elijahkalebabalde1527
    @elijahkalebabalde1527 4 วันที่ผ่านมา

    00:03: Raindomly

  • @karenroxanamunoztapiero5678
    @karenroxanamunoztapiero5678 7 วันที่ผ่านมา

    2.15-⬅️

  • @elijahkalebabalde1527
    @elijahkalebabalde1527 4 วันที่ผ่านมา

    03:40: Naive Raindomly

  • @ishu4227
    @ishu4227 ปีที่แล้ว

    to do sorts that let you choose values, how do u set that? in the thread

    • @smaybius
      @smaybius  ปีที่แล้ว

      This was made back before the thread feature switched to Groovy scripts.

  • @MenTrieuThi-hh3vw
    @MenTrieuThi-hh3vw 4 หลายเดือนก่อน

    2024

  • @init_yp
    @init_yp 11 หลายเดือนก่อน

    several pivot quick sort

  • @marianellasanchez6480
    @marianellasanchez6480 11 หลายเดือนก่อน

    I have arrayV in the informatica computer

  • @Wmafateh
    @Wmafateh 10 หลายเดือนก่อน

    It’s a quicksort

  • @nunthenihtara608
    @nunthenihtara608 2 ปีที่แล้ว +1

    Bro why written Base 4?

    • @smaybius
      @smaybius  2 ปีที่แล้ว +3

      I don't know. That thread is just the LSD radix one but I simply replaced the "L" with "M"

    • @yeetusdelet
      @yeetusdelet 2 ปีที่แล้ว

      @@smaybius wow

    • @sumandbastitv2606
      @sumandbastitv2606 2 ปีที่แล้ว

      @@smaybius more in desc

    • @NishimuraKensei
      @NishimuraKensei ปีที่แล้ว

      What If You Change Radix MSD Into Insertion Sort, By Typing 2048, In Base

    • @gabrielelorisgiuffrida
      @gabrielelorisgiuffrida ปีที่แล้ว

      @@sumandbastitv2606 gli

  • @clovest3rz
    @clovest3rz ปีที่แล้ว

    Sounds like being under a bathtub at some parts

  • @gabrielelorisgiuffrida
    @gabrielelorisgiuffrida ปีที่แล้ว

    Base 10?

    • @smaybius
      @smaybius  ปีที่แล้ว

      It is, but it doesn't say so in the display. This video was done before sort threads moved to Groovy scripts

  • @pennycherriman9756
    @pennycherriman9756 ปีที่แล้ว

    0:48

  • @ishu4227
    @ishu4227 ปีที่แล้ว

    isnt it base 10?

    • @smaybius
      @smaybius  ปีที่แล้ว

      It is, but it doesn't say so because of a problem back when threads were needlessly messy Java code instead of Groovy scripts