Analysis of Quick Sort Algorithm | Time complexity of Quick Sort Algorithm | O(n^2) | O(n log n)

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025
  • This video will give you an in depth analysis of quick sort algorithm.
    Best case - O(n log n)
    Worst Case - O (n^2)
    Average Case - O(n log n)

Комментарии • 49

  • @cstalksbylee4434
    @cstalksbylee4434  2 года назад +3

    Hi all,
    If you have any doubt or query, feel free to write a comment ✍️ to clarify it.

  • @rishipollai5646
    @rishipollai5646 3 года назад +6

    One of the best lecture ever , 🔥 always I am bit confusing with time complexity , now it is totally clear 🤗 thanks to u mam , I really appreciate you efforts 🤗 keep doing such good explanations .

  • @dhirajtaneja2327
    @dhirajtaneja2327 3 года назад +1

    Ma'am Your Explanation is the best I've found compared to websites and other videos .

  • @vishalsingh7285
    @vishalsingh7285 2 года назад

    Thank u so much. I wasn't able to understand this but after seeing ur video finding time complexity seems easier.🙏

  • @gursimransingh8072
    @gursimransingh8072 3 года назад +4

    Completely understood!
    I have never seen such a clean explanation about complexities of the algorithms.
    Please upload more videos especially a playlist on learning complexities from basic to advance problems.

  • @UnknownWell-Wisher
    @UnknownWell-Wisher 2 года назад

    The lecture was to the point with proper information....Goooood!

  • @reetikbahadur1715
    @reetikbahadur1715 3 года назад

    you r a good teacher 😇😇
    Your teaching skill is way better than other😄

  • @sulthanmogal9692
    @sulthanmogal9692 5 месяцев назад

    nicely explained worst case where many did not ! thanks..

  • @jathebest2835
    @jathebest2835 2 года назад

    Thank you so much for helping me understand this basic concept :)

  • @akilprasathr353
    @akilprasathr353 3 года назад +1

    completely understood!! nice and clean video.

  • @ghjkyuio963
    @ghjkyuio963 2 года назад +2

    i am very thankful for this

  • @jhaganb9215
    @jhaganb9215 2 года назад

    Ma'am your explanations was super clear, and highly expect such a good analysis for other algorithms too :)

  • @silvial7367
    @silvial7367 3 года назад +1

    Hi!!! You're helped me a lot, your video is very clear :^) thank you ✨

  • @riddhi_chatterjee
    @riddhi_chatterjee 10 месяцев назад

    Best explanation ever

  • @spreadcareer4448
    @spreadcareer4448 3 года назад +1

    a very clean explanation mam

  • @hayet3198
    @hayet3198 Год назад

    you're the best ! thank you !

  • @prathameshw4
    @prathameshw4 5 месяцев назад

    Thank You Maam!!

  • @asdf85817
    @asdf85817 Год назад +1

    Thanks!

  • @jagadishck5748
    @jagadishck5748 Год назад

    please do video on average case analysis for quick sort

  • @AdrijaPal-ox4bq
    @AdrijaPal-ox4bq День назад

    Why the sum is 2+3+4+5+6+7.... Jab waha par right sub tree me sirf 16 he...to tab to 1 hona chahiye?

  • @ashishksinghal
    @ashishksinghal 6 месяцев назад

    Can you also provide analysis of decending array worst case

  • @kuchipudivijayrahul3296
    @kuchipudivijayrahul3296 Год назад +1

    I don't know why your channel has few subscribers

  • @LokeshKumar-jg8md
    @LokeshKumar-jg8md 10 месяцев назад

    Nice explanation but where's the AVG case

  • @quyeto9001
    @quyeto9001 Год назад

    with n=8; is there any chance we can generate best case array for a quick sort algorithm, please clarify? thank you. for example, we choose pivot as middle of array.

  • @AnuNaik-nu2ct
    @AnuNaik-nu2ct Год назад

    mam for average ,when we say quicksort algorithm is average

  • @aasifmalik5193
    @aasifmalik5193 3 года назад +2

    Mam why are you not uploading videos

  • @deepanshumehlawat8170
    @deepanshumehlawat8170 Год назад

    so does that mean that the worst case will change to nlogn if we take the median as pivot????

    • @cstalksbylee4434
      @cstalksbylee4434  Год назад

      It reduces the likelihood of worst case scenario, but does not guarantee to O(n log n) always, because median is depending on the distribution of data and to select median again sorting is required. Hope it helps you!!

  • @KandhaMaaran-10
    @KandhaMaaran-10 2 года назад

    Mam .. the array is already sorted then it might be a best case.. this is only you teached in last vdos but here the worst case is in the sorted list and best case is in the unsorted list .. I can't understand can you clarify..

    • @cstalksbylee4434
      @cstalksbylee4434  2 года назад +1

      @NK Every algorithm is different from each other. You are not blindly say that all algorithm's best case occur for only sorted list. Some might work well for sorted list, other might work well for unsorted list, depending on algorithm's behavior. This quick sort algorithm does not fit well for the sorted list because of the pivot element it's choosing & it's working behavior.

    • @KandhaMaaran-10
      @KandhaMaaran-10 2 года назад

      @@cstalksbylee4434 thank you so much mam now its clear🙏

  • @nikitajaiswal9112
    @nikitajaiswal9112 3 года назад

    Space complexity?

  • @nancym8049
    @nancym8049 2 года назад

    Mam Average case?

    • @cstalksbylee4434
      @cstalksbylee4434  2 года назад

      @NANCY M For average case also same steps only but you will not get evenly balanced partition like best case( always n/2 elements in left and right child of recursion tree so all the leaf nodes will be in same level). So in avg.case you will not get log n base 2 levels instead log n with some other base value, anyway that is differ by constant value only which will be ignored in asymptotic notations. So we can say O(n log n)

  • @philomath4747
    @philomath4747 5 месяцев назад

    average case not discussed!

  • @azarudeen448
    @azarudeen448 3 года назад

    What abt average case mam

    • @cstalksbylee4434
      @cstalksbylee4434  3 года назад

      That is also O(nlogn) only..

    • @suneethach7913
      @suneethach7913 3 года назад

      Nice explanation 👍

    • @hummairkhan9774
      @hummairkhan9774 2 года назад

      Mam average case time complexity will also follow the same steps like best case?

    • @cstalksbylee4434
      @cstalksbylee4434  2 года назад

      @Hummair khan For average case also same steps only but you will not get evenly balanced partition like best case( always n/2 elements in left and right child of recursion tree so all the leaf nodes will be in same level). So in avg.case you will not get log n base 2 levels instead log n with some other base value, anyway that is differ by constant value only which will be ignored in asymptotic notations. So we can say O(n log n)

  • @arnabmondal9390
    @arnabmondal9390 2 года назад

    Mam please upload full DAA

    • @cstalksbylee4434
      @cstalksbylee4434  2 года назад

      Follow this regularly I'll be uploading DAA from basics to advanced level. ruclips.net/video/1Zr0Z3Hvzxg/видео.html

  • @ghjkyuio963
    @ghjkyuio963 2 года назад +1

    Aoa , plz tell me [n(n+1)/2}-1 what is this?

    • @cstalksbylee4434
      @cstalksbylee4434  2 года назад

      @Ghjk Yuio sum of first n natural numbers when starts from 1 is ==> [n(n+1)/2], but in this worst case, the series is starting from 2 not 1, so subtract 1 from it. ==>[n(n+1)/2] - 1.

    • @ghjkyuio963
      @ghjkyuio963 2 года назад

      thank you very much such a beautiful video of all lactures of all time comlexity.

    • @ghjkyuio963
      @ghjkyuio963 2 года назад

      Plz add more video like merge sort heap sort etc..

    • @cstalksbylee4434
      @cstalksbylee4434  2 года назад

      We'll upload soon.