Big O Notation Series #5: O (n log n) explained for beginners

  Рет қаралды 101,092

Kantan Coding

Kantan Coding

Күн бұрын

Пікірлер: 235
@brucewayne3141
@brucewayne3141 3 жыл бұрын
To those who are confused about how log works, it's basically like splitting a log. All it's asking is how many times do you have to split the big number by the small number to get down to 1. for example log base 2 of 4 basically means that you have to split 4 by 2 two times to get to 1. another example would be log base 4 of 64, you have to split 64 by 4 three times to get down to 1 single wood log piece.
@abdullahalaraz7404
@abdullahalaraz7404 Жыл бұрын
Thank you very much for this explanation. Now I understood how log works
@ahmadafghan6767
@ahmadafghan6767 Жыл бұрын
explained better than the video itself.
@sharafat-karim
@sharafat-karim Жыл бұрын
legend! thanks man
@t6hp
@t6hp 11 ай бұрын
This is a brilliant analogy, thank you so much!
@LE-do5by
@LE-do5by 10 ай бұрын
Thanks
@c4bantle1
@c4bantle1 2 жыл бұрын
Please do not stop making videos! You are the first person to explain this to me in a way I truly understand! Thank you so much!
@kantancoding
@kantancoding 2 жыл бұрын
I’m really happy that you understand now! Thank you 😊
@techhdan
@techhdan 2 жыл бұрын
I've been programming for over a decade but never took the time to understand Big O notation. I landed a Google interview next month and I'm finding myself in a critical timeline to learn algorithms and Big O notation. These videos have been amazing at explaining these concepts very simply. I cannot thank you enough. This is amazing.
@kantancoding
@kantancoding 2 жыл бұрын
Congratulations! I’m glad that they are helpful. I’m sure you will do great 🙂
@WaldoTheWombat
@WaldoTheWombat Жыл бұрын
How did your interview go?
@techhdan
@techhdan Жыл бұрын
@@WaldoTheWombat I unfortunately did not pass but they did say I'd be given another chance next year. My test had nothing to do with Big O notation but instead i had to do a breadth first traversal on a matrix and at that moment i hadn't studied graph algorithms. I'll be ready by next year! 🤜
@WaldoTheWombat
@WaldoTheWombat Жыл бұрын
@@techhdan sorry to hear that, good luck next time. a matrix is a 2d array though, so what do graphs have to do with it?
@techhdan
@techhdan Жыл бұрын
@@WaldoTheWombat i was given a matrix with each element representing land or water. Given a coordinate find if the element is a lake and if so return the area of the lake. With a breadth first traversal you can count all the sorrounding water to get the area. Graphs can be represented as a multi dimensional array.
@whatya2301
@whatya2301 3 жыл бұрын
You should know that your channel is soon going to grow crazy. Loved the content. Especially the graphic part and the tools used makes the concept so much more clear. More power to you.
@kantancoding
@kantancoding 3 жыл бұрын
Thank you. Your comment is encouraging. I’m glad that it helped you out!
@shubhanshusahuu
@shubhanshusahuu 4 ай бұрын
Best video to understand n log n
@Theodore2303
@Theodore2303 3 жыл бұрын
Watched your explanation on Big O of Log N, then I watched this. Now I understand! Thank you!
@kantancoding
@kantancoding 2 жыл бұрын
That's awesome! Great job and keep up the good work!
@thomasgipson7120
@thomasgipson7120 2 жыл бұрын
This helped me so much. Most creators don't go into O(log n) or O(n log n) but you did and you did it in a way that I was able to understand and retain. Thank you!
@kantancoding
@kantancoding 2 жыл бұрын
Thank you! Really happy to hear that 🙂
@markbarlescu1853
@markbarlescu1853 2 жыл бұрын
After 3 previous videos from other creators. Yours is the one that’s most coherent, and finally had it click for me. Thanks!
@kantancoding
@kantancoding 2 жыл бұрын
Happy to be a part of your aha moment 🙂
@TheRescue4study
@TheRescue4study 2 жыл бұрын
You are legend man.....!!!!!!!!!! FULL STOP. Tried to learn logarithms in time complexity no one ever explained log like you.
@kantancoding
@kantancoding 2 жыл бұрын
That’s awesome. When I was learning, the explanations didn’t work for me either. Glad you came to an understanding!
@mayankughade3585
@mayankughade3585 2 жыл бұрын
Man, you just cleared off a reallly big QUESION MARK from my head !!!!!! Thanks a lot.
@kantancoding
@kantancoding 2 жыл бұрын
I’m glad to hear that! Keep up the good work 🙂
@AmeerHamza-mz3cg
@AmeerHamza-mz3cg 11 ай бұрын
Thanks, I finally understand O(nlogn). I never truly understood it in uni but this vid helped me alot. Stay Blessed 🥰
@kantancoding
@kantancoding 9 ай бұрын
Gotta love uni. The place where you pay to teach yourself 🫠
@maiaklimenko6614
@maiaklimenko6614 2 жыл бұрын
I am 10 seconds into your video, and I already understand what n log n is. Wow, just wow
@kantancoding
@kantancoding 2 жыл бұрын
😂that’s awesome! I’m happy that you came to an understanding 🙂
@lillyput2275
@lillyput2275 2 жыл бұрын
U r just a life saviour🙇🏻‍♀️ may god bless u🧚🏻‍♀️
@kantancoding
@kantancoding 2 жыл бұрын
Happy to help 🙂
@demiguo3156
@demiguo3156 2 жыл бұрын
Your vids are one of the best cs topic explanation vids I've ever seen on the tube! You explain it so well and so clear, especially with your calm voice and incredible graphics. You made my life as a cs major college student so much easier, thank u!
@kantancoding
@kantancoding 2 жыл бұрын
I’m glad to hear that they are helpful to you 🙂 thank you!
@prakashpangeni8153
@prakashpangeni8153 8 ай бұрын
You are awesome ! Simply brilliant 🙏 Never understood this until I encountered your videos... Please make more such videos to cover DSA topics.
@kantancoding
@kantancoding 8 ай бұрын
Hey! Thank you! I’m glad it helped. More algo & ds videos coming soon 😊
@eleandro
@eleandro 2 жыл бұрын
You're so good in your explainations that I don't have any questions.
@kantancoding
@kantancoding 2 жыл бұрын
Hey, I’m glad it helped! Thank you 🙂
@JamieDawsonCodes
@JamieDawsonCodes 2 жыл бұрын
I loved the code example + visuals for this. It's extremely easy to understand.
@kantancoding
@kantancoding 2 жыл бұрын
Awesome! Glad it helped you out 😎
@mobileminimaster3015
@mobileminimaster3015 2 жыл бұрын
Great video man. Was dying without understanding what the hell they meant. Now I'm so clear. Thanks a ton.
@kantancoding
@kantancoding 2 жыл бұрын
Thanks 😊 , I’m glad that you understand it now!
@maguilecutty
@maguilecutty Жыл бұрын
How do you not have a million subs yet? Thanks heaps mate!
@kantancoding
@kantancoding Жыл бұрын
Thanks! I’m glad you liked it 🙂
@sp3ctrums264
@sp3ctrums264 3 жыл бұрын
Thank you! Your video made it so much clearer!
@kantancoding
@kantancoding 3 жыл бұрын
I’m really happy to hear that! 🙂
@unizfrhn2803
@unizfrhn2803 3 жыл бұрын
Wow bro. This is the best representation of this concept I've seen yet. Hats off.
@kantancoding
@kantancoding 3 жыл бұрын
I’m glad to hear that! Thank you 🙏
@charlesopuoro5295
@charlesopuoro5295 2 ай бұрын
Thanks always for your clear explanations.
@kantancoding
@kantancoding 2 ай бұрын
Happy to help brother!
@NattapongPUN
@NattapongPUN 2 жыл бұрын
You were so clearly explain. Thanks
@suryak657
@suryak657 3 жыл бұрын
Thanks for the video. It's been open unknown for me, you made it clear today. Thanks again !
@kantancoding
@kantancoding 3 жыл бұрын
Awesome! I’m glad that it helped 😆
@edenmeresman5619
@edenmeresman5619 2 жыл бұрын
I dont know but some videos have the subtitles in spanish!! Thanks you soo much for this videos. Speacking too you a system engenieer student from Argentina.
@kantancoding
@kantancoding 2 жыл бұрын
Hey! I’m glad they helped you 🙂
@mrutyunjayarout3789
@mrutyunjayarout3789 3 жыл бұрын
You have explained it in the very nice way ...... belief me many pro cants explain the way u explained
@kantancoding
@kantancoding 3 жыл бұрын
☺️ that’s great to hear. Thank you !
@exheproject8362
@exheproject8362 2 жыл бұрын
+1point in my test tomorrow with this, thnx^^
@srinidhibandi2313
@srinidhibandi2313 Жыл бұрын
Marvellous explaination!! HATS OFF
@kantancoding
@kantancoding Жыл бұрын
Thanks! I’m glad it helped 😊
@iamsaytara
@iamsaytara 3 жыл бұрын
Brilliant video. Thanks for easing this out for me ❤️
@kantancoding
@kantancoding 3 жыл бұрын
Of course! I’m glad it helped 😄
@thurmansanders3072
@thurmansanders3072 Ай бұрын
Terrific explanation thanks !
@kantancoding
@kantancoding Ай бұрын
Thanks for watching! 😊
@teji_teji_
@teji_teji_ Жыл бұрын
Love this video so much. I though it was in base 10 this whole time like in regular math so I was so confused
@kantancoding
@kantancoding Жыл бұрын
😂 yeah, seems like nobody really mentions that. I guess they think it’s obvious but it wasn’t obvious to me either when I was learning.
@Jezonista
@Jezonista Жыл бұрын
Thank you for that video! Great explanation of the complicated concept!
@kantancoding
@kantancoding Жыл бұрын
No problem! Happy to help 🙂
@ashokyadavfqplmgxjia4668
@ashokyadavfqplmgxjia4668 Жыл бұрын
love you bro from India. it really helpful thanks to make this one....
@kantancoding
@kantancoding Жыл бұрын
Thanks bro! Happy to help
@Hurricane28110
@Hurricane28110 2 жыл бұрын
Excellently explained
@msartist1767
@msartist1767 2 жыл бұрын
Thanks so much for these clear explanations. One thing I think would be helpful to cover are code examples of the space complexity as well as the time complexity.
@Cos_Wayne
@Cos_Wayne Жыл бұрын
This is a great explanation, thank you!
@kantancoding
@kantancoding Жыл бұрын
Thank you! I’m glad it helped you 🙂
@Marcus-cf2li
@Marcus-cf2li Жыл бұрын
Thank you bro. Your contents are absolutely useful for me. I am also interested in software design and I found it in your channel.
@kantancoding
@kantancoding Жыл бұрын
No bro. Happy to help 🙂
@9c_06_gedenararyaarunayoga2
@9c_06_gedenararyaarunayoga2 8 ай бұрын
love from indonesia!!🔥🔥🔥
@julietonyekaoha402
@julietonyekaoha402 3 жыл бұрын
Great explanation. Keep it coming
@kantancoding
@kantancoding 3 жыл бұрын
Thank you very much! :) :)
@Lobogrey2
@Lobogrey2 2 жыл бұрын
Explained this so clear for me thank you
@kantancoding
@kantancoding 2 жыл бұрын
Awesome! I’m glad it helped 🙂
@okeowoaderemi
@okeowoaderemi 2 жыл бұрын
Christ it made so much sense now. Subscribed
@kantancoding
@kantancoding 2 жыл бұрын
I’m glad it helped!
@SRajalakshmiKsekar
@SRajalakshmiKsekar 3 жыл бұрын
Excellent Explanation .Keep on going waiting for more videos in algorithm.
@kantancoding
@kantancoding 3 жыл бұрын
Thank you! More algorithm videos on the way 😉
@rar000000000
@rar000000000 9 ай бұрын
Great video. in the Future, i would use "print(1), print(2), print(3)... etc" instead of 'log' when talking about logs.
@kantancoding
@kantancoding 9 ай бұрын
Haha I remember when I was making these videos I thought.. hmm hope they don’t get confused with log for logging to the console and log in big o.. too many 🪵
@rar000000000
@rar000000000 9 ай бұрын
@@kantancoding It wasn't too confusing, but I did have to rewind a couple times haha. I was relearning Django recently so my brain had to do a reset from pythons print() vs console.log()
@RegularEverydayNormalGuy
@RegularEverydayNormalGuy 2 жыл бұрын
Instant subscribe man, the video is SO well done and easy to understand, it's amazing
@kantancoding
@kantancoding 2 жыл бұрын
I’m glad to hear that! Thank you 🙏
@mahamat_ali_youssouf
@mahamat_ali_youssouf 2 жыл бұрын
Great explanation!
@dylanngo4454
@dylanngo4454 Жыл бұрын
Thank you so much, very interesting info.
@kantancoding
@kantancoding Жыл бұрын
No problem! I’m glad you liked it 🙂
@ben_jammin242
@ben_jammin242 2 жыл бұрын
Nice video. Maybe could bring up best and worse case complexity(ies) as well? The structuring of the video felt a little funny. Maybe it should just be a graphical/visual presentation with the voice overlay? Just an idea. Thanks for the vid!
@MrDangerousBOB
@MrDangerousBOB 3 жыл бұрын
BRO THIS VIDEO IS AWESOME! Keep up the grind bro
@kantancoding
@kantancoding 3 жыл бұрын
Thanks brother. I appreciate that! 🙏
@robinmathur5807
@robinmathur5807 3 жыл бұрын
Explained very well with nice tool, great work and thanks
@kantancoding
@kantancoding 3 жыл бұрын
Thank you 🙏 I’m glad it was helpful!
@danielvandersand7789
@danielvandersand7789 2 жыл бұрын
you best bet I'm about to like and subscribe. Thanks my man, going to be a great resource through my CS academic career
@kantancoding
@kantancoding 2 жыл бұрын
Np! I’m glad it was helpful 🙏
@akmalbukhariev7932
@akmalbukhariev7932 6 ай бұрын
it is worth to smash the like button bro. Thank you
@kantancoding
@kantancoding 6 ай бұрын
Thanks for the support brother!
@volodymyrkredynets784
@volodymyrkredynets784 2 жыл бұрын
I like your explanation, very understandable : )
@kantancoding
@kantancoding 2 жыл бұрын
Thank you🙂 I’m happy to help
@Babe_Chinwendum
@Babe_Chinwendum 2 жыл бұрын
Thank you so much for the video
@kantancoding
@kantancoding 2 жыл бұрын
My pleasure 🙂
@aerospace_andy
@aerospace_andy 2 жыл бұрын
thank you, I understand it now!
@kantancoding
@kantancoding 2 жыл бұрын
I’m glad🙂 keep it up!
@HzHzHzHz111
@HzHzHzHz111 3 жыл бұрын
great explanation, one quick suggestion i have is add links to videos you're referring to in the video description (i.e logn explanation video) thanks!
@kantancoding
@kantancoding 3 жыл бұрын
Good point. I will try to go through these videos and add the corresponding links. Thanks for the feedback!
@zap7140
@zap7140 3 жыл бұрын
Bro, Your video is helpful.
@kantancoding
@kantancoding 3 жыл бұрын
Thanks! Happy to help brother 🙏
@asmith7907
@asmith7907 3 жыл бұрын
These videos are amazing, good stuff
@kantancoding
@kantancoding 2 жыл бұрын
Really happy to hear that! Thank you
@planetofzakir971
@planetofzakir971 2 жыл бұрын
Great Explanation ❤
@kantancoding
@kantancoding 2 жыл бұрын
I’m glad it helped you! 🙂
@Gyooopp
@Gyooopp Жыл бұрын
you got a new subscriber
@kantancoding
@kantancoding Жыл бұрын
Welcome! 😊
@bartek6100
@bartek6100 2 жыл бұрын
thx a lot man! helped so much, appreciate!
@kantancoding
@kantancoding 2 жыл бұрын
Happy to help brother 🙂
@mattp6460
@mattp6460 3 ай бұрын
thank you very much
@kantancoding
@kantancoding 3 ай бұрын
Pleasure!
@tavleenkaur8325
@tavleenkaur8325 2 жыл бұрын
THANK YOU SO MUCH!
@kantancoding
@kantancoding 2 жыл бұрын
Of course! My pleasure 🙂
@Dangerdog3000
@Dangerdog3000 3 жыл бұрын
This was great dude, thank you
@kantancoding
@kantancoding 3 жыл бұрын
No problem! I’m glad it helped 🙂
@anaybaid
@anaybaid Жыл бұрын
This is soo helpful man!! :)
@kantancoding
@kantancoding Жыл бұрын
Awesome! I’m happy to hear 🙂
@anaybaid
@anaybaid Жыл бұрын
@@kantancoding Thanks! :)
@amentothatt
@amentothatt 3 жыл бұрын
so well explained!
@kantancoding
@kantancoding 3 жыл бұрын
Thank you!
@jokesnerd9122
@jokesnerd9122 2 жыл бұрын
Amazing stuff
@kantancoding
@kantancoding 2 жыл бұрын
Thank you for your kind words 🙂
@ashokyadavfqplmgxjia4668
@ashokyadavfqplmgxjia4668 Жыл бұрын
keep it up.........
@Dhanushsaji
@Dhanushsaji 2 жыл бұрын
Thank you
@akmalbukhariev7932
@akmalbukhariev7932 6 ай бұрын
very good brother.
@kantancoding
@kantancoding 6 ай бұрын
Thank you 😊 I’m glad that it helps!
@mammutti3000x
@mammutti3000x 3 жыл бұрын
thank you!
@kantancoding
@kantancoding 3 жыл бұрын
My pleasure 😆
@nquanta1548
@nquanta1548 3 жыл бұрын
Got a new subscriber bro ,nice video👍❤️
@kantancoding
@kantancoding 3 жыл бұрын
Thank you sir 🙏🙂
@adilismail3593
@adilismail3593 Жыл бұрын
Thanks❤
@kantancoding
@kantancoding Жыл бұрын
Happy to help ❤️
@kostabakalinov1237
@kostabakalinov1237 3 жыл бұрын
very helpful!
@kantancoding
@kantancoding 3 жыл бұрын
Thank you!
@yebonbyun7648
@yebonbyun7648 Жыл бұрын
Thanks for super helpful video. I have one question. According to the previous videos, we consider the worst case or highest order part of the function. But what does it become O(n) times O(log n) instead of just O(n)? Thanks in advance!
@kantancoding
@kantancoding Жыл бұрын
No problem! 😊 And to answer your question, it’s not just O(n). It’s O(n) at every level and there are log n levels 😉
@penlavits3305
@penlavits3305 3 жыл бұрын
didn't understand why exactly it works but i understand the math
@hippohugz9966
@hippohugz9966 3 жыл бұрын
thankyou so much
@kantancoding
@kantancoding 3 жыл бұрын
My pleasure! I’m happy to help 🙂
@AwaraGhumakkad
@AwaraGhumakkad 3 жыл бұрын
Its a very nice video but had one question anyone can answer - for the inner loop I believe complexity should have been - O(1), O(2), O(3) ........ and so on , then we can generalize that to O (n). instead here it has been shown as log(1), log(2) and so on ...... then generalization would be log(n). but log(n) is for out loop which is correct. please suggest
@kantancoding
@kantancoding 3 жыл бұрын
Thank you!. Regarding your question, I think you are confusing the console.log() call in the visualization with the complexity.
@anjildhamala4996
@anjildhamala4996 2 жыл бұрын
@@kantancoding haha. That is super easy to be confused about especially since we are trying to understand logarithmic functions and every time you see log(x) you think logarithmic rather than shorthand notation for console.log.
@kentsang9376
@kentsang9376 2 жыл бұрын
omg thank you so much
@kantancoding
@kantancoding 2 жыл бұрын
Happy to help 🙂
@sagarghare9829
@sagarghare9829 2 жыл бұрын
Thanks, buddy for such the best videos. You explain very well. Are you of Indian origin?
@kantancoding
@kantancoding 2 жыл бұрын
Hey thanks! I’m American 🙂
@abldaz.
@abldaz. Жыл бұрын
Good video !
@kantancoding
@kantancoding Жыл бұрын
Thank you! Thanks for watching 😊
@hikamiawnyan
@hikamiawnyan Жыл бұрын
Thanks man
@kantancoding
@kantancoding Жыл бұрын
My pleasure 🙂
@CROXoDyLE
@CROXoDyLE 2 жыл бұрын
I really do enjoy this video and appreciate your work, but going forward I highly recommend reducing the amount of jittering in the animations it was a bit distracting.
@kantancoding
@kantancoding 2 жыл бұрын
😂🤣 yeah, unfortunately the software I used was pretty 🗑 so I couldn’t remove the jittering 🤷‍♂️
@aat501
@aat501 2 жыл бұрын
@@kantancoding I thought it was fine. thanks for the video
@Danfin123
@Danfin123 6 ай бұрын
thank you brooo!!!!!!1
@kantancoding
@kantancoding 5 ай бұрын
Any time brother 😊
@iamthatsid
@iamthatsid 3 жыл бұрын
Thanks bro !
@kantancoding
@kantancoding 3 жыл бұрын
My pleasure brother😆
@sou3598
@sou3598 2 жыл бұрын
thanks a lot for your video. Was wondering how a merge sort is actually O(n log n) ? I mean for dividing is O(n log n) so the other n is for comparing elements ? How’s that ?
@kantancoding
@kantancoding 2 жыл бұрын
Hey, to understand this, try to think about a simpler problem, merging two sorted lists. merging two sorted lists is O(n+m) where n and m are the sizes of the two sorted lists. So we need to touch every element in both n and m to merge them and maintain the sort. Now think about what we are doing at every level with merge sort. We are merging at most n sorted lists (the bottom most level) and at every level, regardless of the number of sorted lists we are merging, the total number of elements in all of the lists on that level is n. So we need to touch n elements at every level. There are log n levels so complexity is O(n * log n)
@MrSunmorning
@MrSunmorning Жыл бұрын
Can you do some run time comparison between merge sort and fibonacci? Given that merge sort split the input in halves on each level of recursion, so we will have nlog(n) run time. When I draw out the recursion calls (like a tree structure), I see that fib look quite similar to merge sort, but fib run time will be 2^n. I think because the input size of the fib recursion calls not reducing so fib is not going to be a log run time. However, I still have hard time wrapping my head around this.
@kantancoding
@kantancoding Жыл бұрын
There’s already a video in this series that explains Fibonacci time/space complexity 👍
@mohammedalgaradi8661
@mohammedalgaradi8661 3 жыл бұрын
great tutorial, what software you use to make the presentation ?
@kantancoding
@kantancoding 2 жыл бұрын
I actually don't remember the name of the software that I used for this. I remember I googled "best whiteboard animation software" or something like that and just picked the one with the best ratings 😎
@anjildhamala4996
@anjildhamala4996 2 жыл бұрын
So, this is pretty obvious when one specifies a value to n (preferably small) and then evaluate how many times it is ran. Is there any pitfall to this approach?
@Mr_TheMan
@Mr_TheMan Жыл бұрын
thx
@kantancoding
@kantancoding Жыл бұрын
No problem!
@magzhanabdibayev3818
@magzhanabdibayev3818 3 жыл бұрын
Great video. A short and understandable explanation.
@kantancoding
@kantancoding 3 жыл бұрын
Thank you! I’m glad that you liked it 😆
@bhupendra8429
@bhupendra8429 2 жыл бұрын
Can you explain about O(n*m),O(n+m) something like that, I have seen this O in leet code time complexity test
@kantancoding
@kantancoding 2 жыл бұрын
They are probably just using n and m to represent two different inputs. This video might help you understand what I mean kzbin.info/www/bejne/qHmwZK2NnNODjKM
@FitnessChaos
@FitnessChaos 3 жыл бұрын
Good vid mate
@kantancoding
@kantancoding 3 жыл бұрын
Thank you! I’m glad it helped 😆
@ninadpradhan6566
@ninadpradhan6566 3 жыл бұрын
What tool did u use to create this transparent white board video ? Any information is appreciated
@kantancoding
@kantancoding 2 жыл бұрын
I think you can just google "best whiteboard animation software." That should put you on the right track.
@ninadpradhan6566
@ninadpradhan6566 2 жыл бұрын
@@kantancoding thanks man
@sameerroshan9542
@sameerroshan9542 11 ай бұрын
O (log N) works for this example but O(n/2) also works for the top level loop which makes it O(n) soo how do you pick log here??
@kantancoding
@kantancoding 11 ай бұрын
I’m sorry but I don’t understand what you mean. I explain why it’s O(n log n) in the video. Which part specifically is confusing you?
@sameerroshan9542
@sameerroshan9542 11 ай бұрын
@@kantancoding The top loop is O(log N). But it can also be O(N/2) right? if not, why can't it be O(N/2) ?
@ProvakorKonik
@ProvakorKonik 3 жыл бұрын
Awesome............ Subscribing to you...
@kantancoding
@kantancoding 3 жыл бұрын
Thank you! I’m glad it helped!
@JuanGarcia-dg8zc
@JuanGarcia-dg8zc 6 ай бұрын
so its log n complexity because instead of going through full size of input n we're cutting it in half?? just wanna clarify!!!
@kantancoding
@kantancoding 6 ай бұрын
Hmm not really. This is n log n. I suggest watching the entire series 🙂
@loganhawkins6486
@loganhawkins6486 3 жыл бұрын
How do you find the time complexity of O(nlogn)
@goldentitan311
@goldentitan311 2 жыл бұрын
nice
@kantancoding
@kantancoding 2 жыл бұрын
Thank you 🙂
@r20de20
@r20de20 2 жыл бұрын
3:22 "Log is always the base of 2". Oh come on! Why does every field have different notation? "Log x" in standard math means base 10, "Log x" in WolframAlpha means natural log, so base e, and now in the computer science there's a base of 2? I mean, yeah, seems logical, because binary... however the lack of unification is horrifying ;-; you can never be sure, if you see just an equation. But anyway! Good video, learnt a lot! :D
@kantancoding
@kantancoding 2 жыл бұрын
😂🤣 Thank you! I understand your frustration
@BBTALKZ
@BBTALKZ 2 жыл бұрын
So if there’s a while loop and a for loop would that be a n log n then?
@kantancoding
@kantancoding 2 жыл бұрын
Not necessarily. Depends on the algorithm. A while loop can be an infinite loop. What is the for loop iterating on? You have to diagnose each algorithm individually. Don’t make the mistake of assuming the complexity of an algorithm based on surface level things like the number for nested loops or whatever. Really look at the input and see how it is scaling.
Big O Notation Series #6: Big O of N Factorial
11:29
Kantan Coding
Рет қаралды 22 М.
Big-O Notation - For Coding Interviews
20:38
NeetCode
Рет қаралды 513 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 129 МЛН
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
The IMPOSSIBLE Puzzle..
00:55
Stokes Twins
Рет қаралды 152 МЛН
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Why Is Merge Sort O(n * log(n))? The Really Really Long Answer.
36:50
Back To Back SWE
Рет қаралды 116 М.
Big O Notation Series #4: The Secret to Understanding O (log n)!
5:14
How to calculate the complexity of an algorithm by BIG O | The clearest explanation!
25:44
Front-end Science із Сергієм Пузанковим
Рет қаралды 128 М.
Linus's Laws of Writing Readable Code
4:02
Kantan Coding
Рет қаралды 67 М.
Why The Logarithm Is So Important For Algorithms & Data Structures
10:05
Clément Mihailescu
Рет қаралды 94 М.
What Is Big O Notation?
17:45
Reducible
Рет қаралды 317 М.
The 3 Laws of Writing Readable Code
5:28
Kantan Coding
Рет қаралды 723 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 129 МЛН