Why Is Merge Sort O(n * log(n))? The Really Really Long Answer.

Поділитися
Вставка
  • Опубліковано 18 лют 2019
  • Free 5-Day Mini-Course: backtobackswe.com
    Try Our Full Platform: backtobackswe.com/pricing
    📹 Intuitive Video Explanations
    🏃 Run Code As You Learn
    💾 Save Progress
    ❓New Unseen Questions
    🔎 Get All Solutions
    Question: Analyze the total work that Merge Sort performs as an exact function of n, the length of the input list.
    My Old MergeSort Video: • Merge Sort - A Step By...
    The Infinite Series 1 + 2 + 4 + 8 + ... : en.wikipedia.org/wiki/1_%2B_2...
    Logarithm Rules: www.chilimath.com/lessons/adv...
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    HackerRank: / @hackerrankofficial
    Tuschar Roy: / tusharroy2525
    GeeksForGeeks: / @geeksforgeeksvideos
    Jarvis Johnson: / vsympathyv
    Success In Tech: / @successintech

КОМЕНТАРІ • 415

  • @BackToBackSWE
    @BackToBackSWE  5 років тому +44

    Table of Contents (If you watch this all, you will know why Merge Sort is upper bounded by O(n * log(n)))

  • @Ghareonn
    @Ghareonn 4 роки тому +118

    Bro, you should be the one teaching me algorithms instead of my college professor, good job!

  • @tomevans2417
    @tomevans2417 3 роки тому +36

    In my 4 years of doing a Computer Science degree I never had a lecturer explain it this well

  • @34521ful
    @34521ful 5 років тому +228

    The patience you had to go through every literal step, god damn, much appreciated (once again) man.

  • @paukatable
    @paukatable 4 роки тому +31

    How COME a person can be this talented at teaching? Thank you a million times!

  • @Egrodo1
    @Egrodo1 5 років тому +47

    Also found your videos through Leetcode. As someone without a traditional CS background, you have a talent for explaining things in a very clear way. I imagine making these videos must be exhausting, but I do hope you continue. Even if that means one per month :)

  • @dindor138
    @dindor138 2 роки тому

    This man can teach a 12 y/o

  • @LenCedeno
    @LenCedeno 2 роки тому +1

    First time I ever saw ANYBODY even attempt to explain how we arrive at log n or n log n or all these math conclusions. And I mean even in texts supposedly written to help you understand algorithms. Most times the lecturers/writers just rush to the final result. Way to go brother!!

  • @Rhunyc
    @Rhunyc 4 роки тому +35

    Hey man, just wanted to add a +1 to the supportive comments. I absolutely love how you do not jump over steps assuming people know what's happening. I have a brain that needs to know why every step is included even if some might find it common sense, so this is wonderful for me. I subscribed to you because I think you deserve it. :) Have a wonderful day!

  • @dawn_connor
    @dawn_connor 2 роки тому

    i'm graduated from uni, but my data structures and algorithms professor sucked. this section of CS has been the bane of my existence for a long time now, and i've really appreciated this video. thanks so much. i needed a long explanation like this.

  • @TripedalTroductions
    @TripedalTroductions 4 роки тому +1

    This is nitpicking but according to the ISO 31-11 standard, log base 2 denoted as lb(x) for binary logarithm, where as log base 10 is lg(x), but log(x) is not defined in the standard. Personally I hate it. Why wouldn't log(x) be log base 10 and lg(x) be the binary logarithm? This is madness. Great video by the way. This is the videos I go to by default now cause the quick and dirty pretty visuals from other channels just don't cut it for me.

  • @cristian-razvanpopa7101
    @cristian-razvanpopa7101 2 роки тому +6

    For those getting stuck at [

  • @anthonylee1309
    @anthonylee1309 4 роки тому +6

    Coming from a non-computer science major, real understanding sorting part was always a real pain. (Even with my experience in working as a sw developer).

  • @domyi6953
    @domyi6953 5 років тому +2

    I found this channel through your comment in LeetCode, and I'm so glad I was able to find your channel before my tech interview. THANK YOU SO MUCH. KEEP IT GOING

  • @adrijasamanta7949
    @adrijasamanta7949 3 роки тому +8

    You have just converted a process of time complexity of O(n ^ 1000000) to O(log n) in this video with your awesome teaching talent. Really like the way you teach with immense patience and dedication.

  • @akshitarora470
    @akshitarora470 4 роки тому +1

    This is the best analysis out there, you leave me in awe with your explanations time and again. Really waiting for new videos! This was the only one I had left by mistake, sad that there's no fresh content coming from you on youtube. Anyways, thanks a ton for all that you are providing to the community!

  • @thestudycoven8771
    @thestudycoven8771 3 роки тому +13

    ^ THIS is how to teach

  • @dragoslavmilutinovic5731
    @dragoslavmilutinovic5731 4 роки тому +8

    You are literally only youtuber who gives deep intuition behind this concept, you are giving us feeling like we could invent this by own, much respecttttt

  • @hegyilevente221
    @hegyilevente221 4 роки тому +1

    You are a legend in teaching. Pure and simple explanation with a very patient attitude. It's clear that you don't do the videos to be done, you really want to transfer your knowledge, and you do it the best. I'm happy that i find you. Keep up the good work brother!

  • @starbloods0013
    @starbloods0013 4 роки тому +6

    literally the best explanation i've ever gotten. i finally get it. i go to a top university but i regret wasting my money when your videos teach me better than my professors