Quick Sort Algorithm

Поділитися
Вставка
  • Опубліковано 29 лип 2024
  • ​Quick Sort is a sorting algorithm based on partitioning the array of data into sub-arrays to sort them recursively.
    This video is produced with the animation engine Manim.
    Manim - Mathematical Animation Framework. www.manim.community
    Manim Animation
    link.curiouswalk.com/manim
    Thanks for watching.
    🔗 www.curiouswalk.com
    ✉️ hello@curiouswalk.com

КОМЕНТАРІ • 131

  • @tobotis2658
    @tobotis2658 3 роки тому +251

    Wow it takes so much afford to animate this.... respect

    • @apdayn
      @apdayn Рік тому +15

      This is so easy if you know python programming and it is used a package called manim

  • @gairick9
    @gairick9 Рік тому +104

    this was so insanely good. deserves 10mil+ views honestly

    • @EliAxel
      @EliAxel Рік тому +3

      indeed, at least 8 billion views

    • @ImBobtheHampter
      @ImBobtheHampter Рік тому +2

      @@EliAxel More, like 9 Nontilion views

  • @maxpo801
    @maxpo801 Рік тому +76

    Really helpful! Contrast to those ultrafast animations, this helps to feel out how does algorithm work. Well done!

  • @sreeharsharaveendra289
    @sreeharsharaveendra289 Рік тому +8

    The most beautiful UI, UX design to explain quicksort algorithm. Sounds, visual cues, animation is too good.

  • @santanu29
    @santanu29 11 місяців тому +6

    Oh my god. I always forget the Quick sort. I will come back to this video whenever I need a refresher.

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

    Actually there is an error in the drawn condition for swap green and orange, it should be inverted. At 0:45 it swaps 0 with 5, but according to condition 'green > orange' (0 > 5) it should not. So the correct condition is 'green < orange' (0 < 5). We are sorting ascending and not descending. ✌

    • @smartrabbitvideos9384
      @smartrabbitvideos9384 Місяць тому +2

      It looks like this is not an issue. The green and red dots represent the indices in the array so 'green > blue' states that if green is at a higher index than blue then swap (not values!). Later once green is smaller than or equal to 4 (pivot) then the new incremented position of yellow is more than the pivot. If the new green element is less than the pivot then it is obviously less than the new incremented yellow value as well.

    • @eauploads3677
      @eauploads3677 10 днів тому

      @@smartrabbitvideos9384 at the start of the video, the green and orange dots were said to represent element at index not index

  • @avnpl13
    @avnpl13 11 місяців тому +9

    Thank you. Visually seeing it happen finally helped me understand the different operations happen and their order

  • @gersonadr2
    @gersonadr2 8 місяців тому +17

    This is amazing. I've learned more in this 2min video than any CS lecture or self study. Please do one for every key concept in CS.

  • @DarongQi
    @DarongQi 9 місяців тому +22

    There seems to be an error in the video. At the bottom the decision tree guide displays green > yellow, where it should be the other other way around.

  • @ve2zzz
    @ve2zzz Рік тому +10

    Thank you a lot !!!
    Simply using sound effects instead of music is by far more relaxing and helpful !

  • @levi8676
    @levi8676 11 місяців тому +4

    Simple and straight to the point, good job

  • @fridericusrex9812
    @fridericusrex9812 9 місяців тому +6

    The best explanation on all of UA-cam!

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

    Woah!!!! This was amazing dude. Keep making such videos :)

  • @santanusengupta262
    @santanusengupta262 Рік тому +3

    Awesome work . Thank you so much

  • @dhruvkumar-br2lp
    @dhruvkumar-br2lp 4 місяці тому +2

    Most amazing animation to explain quick-sort

  • @kaoutaeaea649
    @kaoutaeaea649 Рік тому +2

    Only after watching 1M videos, I landed on the best one. I can now write the code myself after understanding the depth. Thanks a lot!

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

    This video is so underrated, amazing explanation!

  • @YashRaj-zs1oo
    @YashRaj-zs1oo 2 місяці тому +1

    In one way or another now I totally get quicksort. thank you for the video.

  • @user-ft1ux2gx6w
    @user-ft1ux2gx6w Рік тому +13

    Your videos are really do easy to understand. I understood all sorting techniques through your videos. Can you please make videos on linked list concepts please. It would help us in better understanding. U guys are doing a great job, hope u continue it and go ahead.

  • @phythematics2188
    @phythematics2188 2 роки тому +5

    If had millions of dollars, I would have given you one.

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

    I love the sound effect thank you

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

    Congratulations on this animation. I had never understood what the swap rule was like between current position value and swap position value. With this animation I understood that after increasing the exchange position by 1, its value must be exchanged if the value of the current position is less than that of the exchange position, this way the exchange position will always contain a value less than or equal to the value of pivot.

  • @arpitnagar5792
    @arpitnagar5792 Рік тому +2

    great presentation pal! Thanks

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

    I think this one is the best one in terms of visualization.

  • @piyushanayak
    @piyushanayak Рік тому +1

    OMG this is beautiful!!! 💖😍

  • @gradientO
    @gradientO 2 роки тому +4

    Beautiful ❤️

  • @icyflamingo4142
    @icyflamingo4142 5 місяців тому +1

    Best 4k video of all time

  • @denisonesteves9501
    @denisonesteves9501 Рік тому +2

    Amazing job!

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

    This is one of the best channel to learn computer science concepts in general.Please keep creating and posting more videos as these animations are highly useful in understanding the underlying concepts.Can you please share the manim code you used to create this animation.

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

    the best video i`ve ever seen.

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

    loovoly video mate thanks alot

  • @user-he9gv1el7m
    @user-he9gv1el7m 6 місяців тому +1

    Short and easy :)
    Good Job!!

  • @Mohajer-jt5tk
    @Mohajer-jt5tk Місяць тому +2

    great explanation thanks alot

  • @nandna8
    @nandna8 7 місяців тому +3

    Can u plz provide the code

  • @user-hv2cx3iw5z
    @user-hv2cx3iw5z Рік тому +1

    the best visual explanation! I really liked it and it was beneficial! Also, it's my first comment) you really deserve it!!!

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

    green dot is iterator.. like i in for loop.
    orange dot keep track of elements what are smaller than the pivet.
    steps:
    1. select the pivet. (last element)
    2. traverse through the array and compare each element with the pivet. if it finds element less than the pivet, move orange dot one place. then swap places.(this action move elements that are less than pivet, close to each other.)
    3. if green dot goes to the pivet, then again move green dot one place and swap it with the pivet.
    now we have the pivet in place where it placed correct place it should be.
    do this recursively

  • @Rejuyan-Ahmed
    @Rejuyan-Ahmed 4 місяці тому +1

    Thanks man.

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

    beautiful animation

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

    Fantastic animation

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

    Awesome video,🙌

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

    finally found the gem.

  • @manuelpagliuca
    @manuelpagliuca 5 місяців тому +1

    This was great!

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

    Yussss this is what i needed. sank you

  • @girishgarg2816
    @girishgarg2816 3 роки тому +39

    Nice sound effects. How did you sync them so perfectly with the animations?

    • @anwarulbashirshuaib5673
      @anwarulbashirshuaib5673 2 роки тому +19

      manim has built-in methods for that purpose. You can pair sound effects with the animations you want

  • @rajatnayak972
    @rajatnayak972 2 роки тому +9

    it hurts to see this not getting enough credit😔

  •  Рік тому +1

    Amazing!

  • @Dushyanth_0_0_7
    @Dushyanth_0_0_7 6 місяців тому +2

    Nice easy to understand ❤❤

  • @Ian-bb7vv
    @Ian-bb7vv 3 місяці тому

    Insanely good

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

    really amazing

  • @explorerars4208
    @explorerars4208 6 місяців тому +1

    Wow Wow such a nice animation thank you

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

    How to make these kind of animations!

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

    great work

  • @user-dy7wm3vb3r
    @user-dy7wm3vb3r 6 місяців тому +1

    It's really amazing and the animation with the sound are really cute

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

    criminally underrated content

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

    Thanks

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

    very good

  • @rabia-ku2os
    @rabia-ku2os 6 місяців тому +1

    THAT S AMAZINGGG

  • @user-qd4oo9wu7f
    @user-qd4oo9wu7f 10 місяців тому +1

    Great animation ! just would like to ask about the source of the sound effects

  • @thechosenone7465
    @thechosenone7465 10 місяців тому +1

    thanks you so much😍

  • @yuvalamir3226
    @yuvalamir3226 6 місяців тому +4

    This was very helpful, but I had a hard time understanding the intent behind the seemingly simple operations for the partitioning. A slide at the start with some text would have been helpful.
    Here's the idea if anyone else struggled understanding it.
    You have a moving pivot (orange) and a swapper (green).
    The moving pivot (which starts at -1) maintains a territory to it's left (and where he currently is) of numbers which are smaller or equal to the pivot.
    The swapper looks for the numbers which are smaler than or equal to the pivot and moves them into the moving pivot's territory.

  • @harshithnaidu8568
    @harshithnaidu8568 11 місяців тому +1

    amazing

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

    good job.

  • @anonymous-go3cd
    @anonymous-go3cd 7 місяців тому

    I have a confusion in some video I saw when we choose pivot in left side greater element is search from left to right and smaller is right to left and you are doing both from the same side is it same ?

  • @minh-tamvo4608
    @minh-tamvo4608 5 місяців тому +1

    most satisfying tutorial

  • @uwu-zx5hv
    @uwu-zx5hv 5 місяців тому +1

    Really nice animation

  • @gutzimmumdo4910
    @gutzimmumdo4910 Рік тому

    perfectly explained

  • @shaankhalid1578
    @shaankhalid1578 Рік тому +2

    Can you share the code. For the learning prospects. Please

  • @orzigelboim3013
    @orzigelboim3013 Рік тому

    Amazing

  • @coding.tutorial3713
    @coding.tutorial3713 Рік тому +1

    Wow gargeous 😮 👌👌

  • @udaysrivastava_
    @udaysrivastava_ 6 місяців тому +1

    Even a kindergarten kid can understand it seeing this video, DAMN!

  • @hugolatendresse7617
    @hugolatendresse7617 5 місяців тому +1

    Isn't there an error? At the bottom-right, the condition for swapping should be [green < orange], not [green > orange]

  • @victorm6430
    @victorm6430 Рік тому +1

    Thank you! Best video on Quick Sort!

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

    does this mean if "index" is greater than "swap marker" they will swap?

  • @benajaero
    @benajaero Рік тому +1

    this is crazy

  • @eclipse9925
    @eclipse9925 Рік тому +1

    Finelly!!!

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

    Is this Hoare schemes? Why it looks different?

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

    This example uses Lomuto's partitioning algorithm.

  • @PromptStreamer
    @PromptStreamer Рік тому +1

    Nice video aesthetic

  • @statologyMovement
    @statologyMovement Рік тому

    0:53 Current index is not greater than swap index. Why does it still swap?

  • @imanueljodi1201
    @imanueljodi1201 2 роки тому +3

    This is the best explanation for me

  • @Shadow-iw9wq
    @Shadow-iw9wq 4 місяці тому

    this doesn't work with multiple duplicate elements in an array, maybe someone can help me with 40420 I get stuck at 424 with pivot 4

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

    terimakasih, daya sudah mengerti quicksort 5 menit sebelum ujian

  • @shubhamdhiman7516
    @shubhamdhiman7516 Рік тому +2

    Please make more videos on other sorting methods.

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

    I want a source code of this animations

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

    0:32 why 2 is not swapped after +1 it will become 3 which is less than pv?? It need to swap

  • @parmaruday1905
    @parmaruday1905 Рік тому +2

    can you please explain how to decide orange and green's position (index) according to pivot ?

    • @nuqb
      @nuqb 5 місяців тому

      quick sort goes left to right. so green and orange will be on the left. you can choose any number as the pivot index but you will put it to the right of the list and then do this process in the video.

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

    7 to 6 in the third level, it dint exchange the value ?? y

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

    BESTT

  • @AkashRoy-do2dg
    @AkashRoy-do2dg Рік тому +3

    thanks for the animation but there's a slight mistake in ---> [green] [orange+1] ----> [ green] > [ orange] ===> it should be [orange] >[green] then swap If I'm not wrong. wouldn't have figured the algo without your animation( I've figured the error cuz of that) again thanks!!!!!!

    • @curiouswalk
      @curiouswalk  Рік тому +3

      Thanks for your interest.
      • (dot) is the index position.
      [•] (dot in brackets) is the element at index • (dot)
      Comparing only the • dots means comparing the index positions of the • dots only and not the elements at • the dots.
      A detailed explanation at 0:15 would have been helpful.

  • @user-xm7xl1kf4q
    @user-xm7xl1kf4q 2 роки тому +7

    Great job. can you give the source codes?

  • @Abon963
    @Abon963 Рік тому +1

    W animation

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

    Orange > green

  • @tedtieken3592
    @tedtieken3592 Рік тому +1

    I almost understood it this time

  • @eh2061
    @eh2061 Рік тому

    Isn't the last condition (grean > orange) false and should be orange > green?

    • @curiouswalk
      @curiouswalk  Рік тому

      A detailed explanation at 0:15 would have been helpful.
      • (dot) is the index position.
      [•] (dot in brackets) is the element at index • (dot)
      Comparing only the • dots means comparing the index positions of the • dots only and not the elements at • the dots.

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

    Does there seem to be a problem at green > orange => swap ???

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

      seems yes, I also noticed this and decided to read the comments if I am not missing something.
      this condition should be changed on opposite one.

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

    green>orange isn't it wrong? actually orange >green, before swap

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

    1:22 why swap if green is not bigger than orange?

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

      That's a mistake if orange is greater than green then swap

  • @amazingcontent4213
    @amazingcontent4213 Рік тому +2

    Super duper 🔥

  • @Phongo-tw3he
    @Phongo-tw3he 3 місяці тому +1

    Use technical services help people more understand technologies. thank so much

  • @fjpa654
    @fjpa654 Рік тому +8

    What a great videos! however, I think the "greater than" operator comparing green with orange should be less than, and you have greater than. when you compare 5 with 0, zero(green) is less than 5(orange), and you have swap if green is greater than orange. It should be backwards
    really great video tho.

    • @curiouswalk
      @curiouswalk  Рік тому +3

      Thank you for asking about this.
      So we are comparing each element (the green dot is the current index) to the pivot value (in our case, the last element of each array) and swapping the element at the green dot (the current index) with the element at the orange dot when required.

    • @anasriaz5199
      @anasriaz5199 5 місяців тому

      @@curiouswalk he is saying u are comparing green with orange with a > symbol as shown but in actual u are comparing them using < operator
      i had the same confusion.
      i guess there is a typo or i didnt get it so i am rewatching it bcz it can be a mistake at my end .