Quick Sort Algorithm

Поділитися
Вставка
  • Опубліковано 22 січ 2025

КОМЕНТАРІ • 172

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

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

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

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

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

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

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

      indeed, at least 8 billion views

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

      @@EliAxel More, like 9 Nontilion views

  • @maxpo801
    @maxpo801 2 роки тому +94

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

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

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

  • @avnpl13
    @avnpl13 Рік тому +11

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

  • @MrJbauer12
    @MrJbauer12 3 місяці тому +4

    For future watchers/viewers
    • (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.
    Thanks a lot, this video was the only one that helped me understand this algorithm. Much respect.

  • @gersonadr2
    @gersonadr2 Рік тому +22

    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.

  • @fridericusrex9812
    @fridericusrex9812 Рік тому +6

    The best explanation on all of UA-cam!

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

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

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

    Hope you continue doing this stuff for other algorithms!, you deserve millions of subscribers

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

    This was one of the best and clearest explanations I have found. Awesome!

  • @NarayanadasuMeghana
    @NarayanadasuMeghana 5 місяців тому +4

    I have watched so many videos on quick sort.but i didn't understand all of them, but this video makes me sense. and i have understood it very perfectly.

  • @dhruvkumar-br2lp
    @dhruvkumar-br2lp 10 місяців тому +3

    Most amazing animation to explain quick-sort

  • @БогданКоваль-ф2ф
    @БогданКоваль-ф2ф Місяць тому +1

    Thank you so much, it helped me understand it clearly.

  • @arlessonlima7811
    @arlessonlima7811 9 місяців тому +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.

  • @levi8676
    @levi8676 Рік тому +4

    Simple and straight to the point, good job

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

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

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

    This video is so underrated, amazing explanation!

  • @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!

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

    you boy makes this really easy........this 3 minutes are fascinating!

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

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

  • @ДмитроІльків-ж7и

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

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

    Wonderfully made thank you so much, exam in 9 hours.

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

    wow mindblowing this is a masterpiece

  • @LakhveerDhot
    @LakhveerDhot 22 дні тому +2

    happy new year and very very thank u 😍🥰

  • @TusharSavant-s5q
    @TusharSavant-s5q 25 днів тому +1

    great explanation thanks alot

  • @prashantagarwal3339
    @prashantagarwal3339 10 місяців тому +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.

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

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

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

    I don't think if I ever forget Quicksort agian

  • @GaïaCheikho
    @GaïaCheikho Рік тому +1

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

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

    Best 4k video of all time

  • @HeenaTabassum-y4z
    @HeenaTabassum-y4z Рік тому +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.

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

    I love the sound effect thank you

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

    Awesome work . Thank you so much

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

    the best video i`ve ever seen.

  • @slivkask8329
    @slivkask8329 8 місяців тому +41

    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 7 місяців тому +8

      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 6 місяців тому +1

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

    • @kokonut5498
      @kokonut5498 4 місяці тому

      @@eauploads3677 only if there is a bracket around it, if not then it represents the indices

    • @Mayankkleo
      @Mayankkleo 4 місяці тому

      @@eauploads3677 i saw that error too but after @smartrabbitvideos9384 reply I realised that dot with square brackets [dot] represents value and only dots represents index

    • @abhilashgarapati8006
      @abhilashgarapati8006 4 місяці тому

      what you said is correct

  • @DarongQi
    @DarongQi Рік тому +30

    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.

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

      yup

    • @ashmit21
      @ashmit21 4 місяці тому +5

      It refers to the index position, not the value of swap marker in the array

    • @Lavamar
      @Lavamar 4 місяці тому

      No, the video is correct. Like the other commenters said, the orange and green dots represent the indices in the list, not the elements themselves.

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

      I got confused, too. I read a comment from the channel's owner, who commented under someone else's comment. We need to look at the indices, not the element inside the array. Below is his comment: "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."

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

    beautiful animation

  • @Mohajer-jt5tk
    @Mohajer-jt5tk 7 місяців тому +2

    great explanation thanks alot

  • @arpitnagar5792
    @arpitnagar5792 2 роки тому +2

    great presentation pal! Thanks

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

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

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

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

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

    criminally underrated content

  • @RISHAVKUMAR-c4h
    @RISHAVKUMAR-c4h 11 місяців тому +1

    Short and easy :)
    Good Job!!

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

    finally found the gem.

  • @aliozgurcakmak5145
    @aliozgurcakmak5145 13 годин тому +1

    It was the greatest thing i have ever seen!

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

    Really nice animation

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

    OMG this is beautiful!!! 💖😍

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

    Can u plz provide the code

  • @rajatnayak972
    @rajatnayak972 3 роки тому +10

    it hurts to see this not getting enough credit😔

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

    most satisfying tutorial

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

    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

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

    Nice easy to understand ❤❤

  • @yuvalamir3226
    @yuvalamir3226 Рік тому +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.

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

    Fantastic animation

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

    This example uses Lomuto's partitioning algorithm.

  • @denisonesteves9501
    @denisonesteves9501 2 роки тому +2

    Amazing job!

  • @hugolatendresse7617
    @hugolatendresse7617 11 місяців тому +2

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

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

    This was great!

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

    Yussss this is what i needed. sank you

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

    Wow Wow such a nice animation thank you

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

    Alright! So how to merge them all in the end? I should maintain a map to hold each value at each index?

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

    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

  • @shaankhalid1578
    @shaankhalid1578 2 роки тому +2

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

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

    Beautiful ❤️

  • @Nissan-d5d
    @Nissan-d5d 3 місяці тому +1

    WOW!! The animation explains the sorting algorighm in easiest way!! Just wondering could you share the colab notebook code of that animation?

  • @anonymous-go3cd
    @anonymous-go3cd Рік тому +1

    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 ?

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

    Thanks!

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

    This is the best explanation for me

  • @HieuTran-ho3mx
    @HieuTran-ho3mx Рік тому +2

    very good

  • @rabia-ku2os
    @rabia-ku2os Рік тому +1

    THAT S AMAZINGGG

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

    Awesome video,🙌

  • @Emirii55
    @Emirii55 7 днів тому +1

    incredible ♥

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

    really amazing

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

    when the green is greater than orange we have to swap or when the orange is greater than green we have to swap?

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

    great work

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

    How to make these kind of animations!

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

    loovoly video mate thanks alot

  • @user-kq3ev9rc5u
    @user-kq3ev9rc5u 2 місяці тому +1

    How to do you pick the pivot value

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

      just pick the arrays last element as pivot

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

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

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

      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.

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

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

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

      it was checking the index position, not the element of index

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

    I want a source code of this animations

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

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

  •  Рік тому +1

    Amazing!

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

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

    • @anwarulbashirshuaib5673
      @anwarulbashirshuaib5673 3 роки тому +20

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

  • @justsomeguy8385
    @justsomeguy8385 4 місяці тому

    This does not handle duplicates if you check when you swap if current value == pivot

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

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

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

    Thanks man.

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

    good job.

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

    Perfect

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

    Wow gargeous 😮 👌👌

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

    Nice video aesthetic

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

    Insanely good

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

    love this so much!!!! would be great brain rot with some sound design improvements

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

    Thank you! Best video on Quick Sort!

  • @ABOUDIBRAHIM-h4j
    @ABOUDIBRAHIM-h4j Рік тому +1

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

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

    thanks you so much😍

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

    sangat membantu aku suka

  • @shubhamdhiman7516
    @shubhamdhiman7516 2 роки тому +2

    Please make more videos on other sorting methods.