1 7 Merge Sort Analysis 9 min

Поделиться
HTML-код
  • Опубликовано: 26 янв 2017

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

  • @ankitathakur399
    @ankitathakur399 5 лет назад +2

    amazing explanation. thanks:).. Looking forward to all other videos

  • @sriharsha8650
    @sriharsha8650 6 лет назад +1

    Awesome Explanation !!!

  • @quantlfc
    @quantlfc 5 лет назад

    amazing!

  • @spoting6985
    @spoting6985 6 лет назад +1

    amazing

  • @FredoCorleone
    @FredoCorleone 5 лет назад

    This lecture is interesting! :)

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

    Wonderful!! It is just so beautiful!

  • @mohamadsalah2523
    @mohamadsalah2523 5 лет назад +1

    Could you please provide a like to the slides ? thank you in advance.

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

    But recursion trees are not proofs, they are just used for visualizing and give us some idea about what the time complexity might look like.

  • @HAAH999
    @HAAH999 5 лет назад +3

    I like your lectures but it could be greatly enhanced if its more slower. Sometimes, I have to run the CC to cope with your speed and this makes me lose focus. However, up till this lecture, things seem great. I will update in later lectures though

    • @gouripanda7517
      @gouripanda7517 5 лет назад

      You just need some practice.

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

      Gear | Playback Speed | 0.75

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

      we are programmers!
      if you are using Chrome, just type the following code into your js console in developer mode for a x0.9 playback rate or any other number your ears prefer:
      $('video').playbackRate = 0.9;

  • @ParthPatel-vj2zv
    @ParthPatel-vj2zv 2 года назад

    0:00
    0:40

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

    If n = 4 the number of levels j = 0, 1, 2. The maximum level is 2.
    But log n base 2 + 1 ≠ 2.

    • @re1konn
      @re1konn 2 месяца назад +1

      You need to count the root level too

  • @xsli2876
    @xsli2876 4 года назад +1

    I cannot understand 6n*(logn + 1). I think it should be 6n*logn. It is true that the number of levels is logn+1. However, the work is done when moving from one level to the level above it. (From 1:00AM to 5:00AM, there are 4 hours, not 5 hours; from 5th floor to 8th floor, we need to take stairs 3 times, not 4 times). Both reaches O(nlogn) time complexity. But I just don't understand 6n*(logn +1). I have checked the prestigious book "Introduction to Algorithms" by Cormen, Lerserson etc. It also states it is cn*(logn+1) and finally it is O(nlogn) time complexity. On the other hand, several you-tube merge sort videos agree with my thinking. Nevertheless, merge sort time complexity is O(nlogn).

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

      This initially confused me as well, but it made sense once I plugged some numbers in. Log(1) == 0 so if the runtime was 6n*logn like you propose, then an input array of length 1 would take 0 time to sort. This would be incorrect, because the algorithm still needs to "sort" the array (even though it is length 1) by running the merge operation on it and this merge operation takes 6n steps.