Get the full course here ➡ keeponcoding.io/data-structures
@sarahaz41512 ай бұрын
oh no sight cant be reached
@sarahaz41512 ай бұрын
could you post it again
@ricardoestrella954 жыл бұрын
Definitely you're my hero. I just reached this topic in my data structure classes last week and I didn't understand at all until now. I wish you were my teacher. :(
@aayushmathpal96654 жыл бұрын
After 4 hours of searching I got this video and finally understood the concept of Big O. Why don't you tube recommend such videos on the top :(
@MrElderwand3 жыл бұрын
What an amazing explanation, hope this will definitely help me in cracking my next set of problems. A big thanks!
@sabianzhupa28232 жыл бұрын
I have an exam in data structures tomorrow, you really help me a lot , thank u man you are awsome :)
@ArmanOganesyan4 жыл бұрын
That is a very useful, dude! Eventually I understood why O(2n) is O(n). And the last example was really tricky. Thank you for the video.
@skumakerguitar87084 жыл бұрын
haha yea this is happened to me
@theaudiomelon2 жыл бұрын
I got more out of this than my last two class sessions of my teacher trying to explain it. THANK YOU
@azkymohamed1234 жыл бұрын
Great refresher... Gotta admit, I missed the last one.
@samuelmichael9144 жыл бұрын
Been trying to understand the nested for loops for a while and how they work in bubble sort. Thank you for the explanation.
@jorgevasquezang4 жыл бұрын
Great explanation, thanks for sharing!
@bbbbluhhhh3 жыл бұрын
Best video that helped me in my data structures course. Code examples are so helpful!
@abel942144 жыл бұрын
This was amazing! Please please make more. You are very good teacher man!
@TheFirstNerubi3 жыл бұрын
came here to learn more about bigO and learned also how to draw out recursive methods! -- they always gave me a hard time; thanks a lot!
@MohammedBakheet4 жыл бұрын
That was beautiful man, can't thank you enough, keep coding
@vdtidake4 жыл бұрын
crisp and clear explanation
@GreenFlame163 жыл бұрын
Value acquired, expressing gratitude
@saideepesh60364 жыл бұрын
Make a part-2 explaining some harder problems.
@shreephadke36794 жыл бұрын
I second this!
@makok58254 жыл бұрын
@@shreephadke3679 Same
@jeff_mci_gaming60184 жыл бұрын
I agree, these are common examples. Good stuff tho
@vighnesh934 жыл бұрын
+1
@nikhilraov1004 жыл бұрын
Simple explanation is the best explanation and u have nailed it
@FlawlessYT662 жыл бұрын
What a hero you highlighted on tricks that i wasnt aware of. Much Thanks
@prafulmaka77102 жыл бұрын
Very good explanation on application of BigO to real examples. Liked and subscribed!
@chilkuru3 жыл бұрын
Wonderfully explained the Big 'O' Notation calculation. Thanks
@kpkauur3 жыл бұрын
Brilliant explanations. Please cover all the big O's examples & coding exercises of cracking the coding interview.
@ngndnd2 жыл бұрын
this is exactly what i needed. Im the type of person who can ONLY learn from examples or else i zone out i did find the parts with the recursive tree kind of confusing. Didnt really understand why you did what you did
@pujakarmakar91763 жыл бұрын
The last one was really tricky for me thanks for the video now I'm going to ace the presentation!!!!
@Lons_Tran8 күн бұрын
@5:42 I'm not understand why it's not a quadratic time since a is o(n) and b is o(n) I'm not familiar of bigO(a*b) what's is it ranking in the chart?
@Ewson5564 жыл бұрын
You know I'm starting to think you follow me around in real life. Next week I have an exam that includes a topic like algorithm analysis. Yet here you are....
@prodigalScindian3 жыл бұрын
Gone through so many articles and tutorials and never understood this bigO.. Simple problems with breakdown really helped understand better.. Thank you.. Can we try some complex example problems please
@Bosnian12122 жыл бұрын
Thank youuuu I needed these code examples
@atifworld2 жыл бұрын
Best explanations, specially the last one Thank you
@DeGoya2 жыл бұрын
it should be noted that println also takes time complexity of O(n) since it has to print every character of a string individually
@vasugupta14 жыл бұрын
Good explanation mate, keep it up
@mohamedalthaf5263 жыл бұрын
You are breaking the rule of teaching but in a good way!
@escargoux3 жыл бұрын
in the fibonacci sequence, where are you getting the constant 2 from? (2^0, 2^1, 2^3..)?
@Lentato Жыл бұрын
because at the first level its 1, so 2^0, next level its 2, so 2^1, and next its 2^2, which is 4. He literally explained it in the video
@abovebelow40612 жыл бұрын
I have my onsite with google in two hours hahaha I'm really glad I saw this
@justinliebenberg2321 Жыл бұрын
My exam is tomorrow... I didn't really understand this topic until now. Thank you sir.❤
@aaryadeshpande16212 жыл бұрын
Question: 3:27 - can you please elaborate on why a constant doesn't make much difference? It seems like we would keep it since if n=1000 iterations, then for 2n, that would be 2*1000, which is 2000, as opposed to 1000. Or 20n throughout a program, then won't 20*1000 be MUCH different than just 1000 alone? I likely don't have the mental framework necessary to find this intuitive, so could someone explain it or direct me to a resource? Thanks!
@a7xxd Жыл бұрын
It is very possible for O(N) code to run faster than 0(1) code for specific inputs. Big O just describes the rate of increase. For this reason, we drop the constants in runtime. An algorithm that one might have described as 0(2N) is actuallyO(N). Many people resist doing this. They will see code that has two (non-nested) for loops and continue this 0(2N). They think they're being more "precise:'They're not.
@cebastiansantiago32034 жыл бұрын
Bro thank you so much this makes so much sense better explanation then my professor
@kamran_desu2 жыл бұрын
Brilliant, best way to explain is to use examples like this to hit it home.
@skumakerguitar87084 жыл бұрын
thanks i have been thinking first example is O(n2) and 3rd example is O(n3) thanks for detail !
@KeepOnCoding4 жыл бұрын
Glad to help!
@pratiknalage64082 жыл бұрын
This is amazing, exactly what I needed.
@aponoypi6 ай бұрын
learning the big O notation from stanford algorithm class. retired from IT after 35 years. missed programming
@MisTree11811 ай бұрын
thank you for your share~ best big-o examples!🤩
@almora4888Ай бұрын
thank you limited time the exact thing i searched for
@codewithmarwan4 жыл бұрын
That was really helpful, deserve a sub and a big thumps up haha
@vanjamihajlovic160517 күн бұрын
thank you for this!!! this is SO helpful 🙏
@xelordragon45074 жыл бұрын
I think the biggest mistake for Big O is that people also forget that we are after the biggest time complexity so we drop the lower time complex values. Ex. 2N *2^N With this one 2N is a lower time complexity then 2^N so we don't really care about it and we would just drop it. Making the time complexity 2^N
@giacomodario56613 жыл бұрын
What you say works with sum or multiplication by constants but the complexity here is O(N*2^N) because it is another infinite order bigger than 2^N and you have to take it into account :)
@juliahuanlingtong67573 жыл бұрын
Good stuff! Please Make part2- more compliacted and tricky examples!!!
@KuldeepSingh-jg9xz3 жыл бұрын
super !!! Keep up good work bro...
@yahyayozo86603 жыл бұрын
thanks man this really helped me
@michalrabek77433 жыл бұрын
8:38 Recursive Fibonacci sequence... Ouch, my eyes. You should've shown the iterative implementation too, it would've been very beneficial. Nevertheless, it was a great video. I'm looking forward to part 2 :-)
@jaatharsh4 жыл бұрын
can you plz share some reference/links to better understand last Problem time complexity, thanks in advance
@KeepOnCoding4 жыл бұрын
You can reference the Big-O chapter in Cracking the Coding Interview
@fungusthemungus375410 ай бұрын
You're a life saver!!! Thank you so much!
@patrickgroves17653 жыл бұрын
Examples with O log n and O n log n please!
@troyhackney148 Жыл бұрын
Great video! I was hoping to see O(logn) :)
@yuriiharasymovych71823 жыл бұрын
Thanks a lot! Solved a lot of problems in my mind :)
@aztlijimenez3 жыл бұрын
This is exactly what I needed. Thank you so much!!!! :)
@frozen_dusk5793 жыл бұрын
Thank you I wasn't sure that I understood Big O
@parabalani3 жыл бұрын
Great video! But it's scary that some of these can be in an interview
@zaidpatel8695 Жыл бұрын
That last one got me too.
@ayanaxhye2 жыл бұрын
“the time complexity is based on whether or not the algorithm changes based on the input”. if the input doesn’t affect the algorithm then it is constant time. 😮
@JacobBrenke3 жыл бұрын
Hey man, this was valuable. Thank you.
@ariton29904 жыл бұрын
Can you do tutorial on Java bitwise operators?
@NandoLofi2 жыл бұрын
Just finishing my coding boot camp and trying to understand this....I know it's big for interviews but I want to have a strong understanding it. New to all this...seems difficult a bit .
@jacobwerner85335 ай бұрын
is this java code? im learning big-o through a c data structures and algorithm book.
@cabiste4 жыл бұрын
3:05 i thought you were writing outside my screen
@fantashio4 жыл бұрын
Nice video!!
@Viruzzent4 жыл бұрын
Awesome vid. Thanks can u help me with this? im making a game for school. a card game in java. im learning a lot of stuff but i dont know much about design patterns. What design patters would you do for a card game?.
@dharsan.s79374 жыл бұрын
no O(logn) and O(log logn) it will be tricky with logs
@krishshah39744 жыл бұрын
the background is lit :)
@kellenstuart46983 жыл бұрын
Appreciate the video. That helped.
@phofuria4 жыл бұрын
In the last example why we don't count how many times the fib will be called?
@memegalore2574 жыл бұрын
How about O(log(n))
@TitusRex3 жыл бұрын
Thanks a lot for this video
@omermir3324 жыл бұрын
Thank you!
@nelsonberm391011 ай бұрын
Thanks man!
@josephwong28324 жыл бұрын
Thanks for the video
@christopherobrien62154 жыл бұрын
O(a*b)? first time i'm seeing this. i don't see anything that resembles it on the wikipedia page for big o or other resources i use. what is it called? ie constant, logarithmic, polynomial, etc. what's the name of O(a*b)?
@voldyking45264 жыл бұрын
It is just like n^2... But think of this in this way...if you had to traverse through a matrix with rows and columns equal to n,then time complexity would be n^2 right...but what if the matrix has different rows and columns..say no.of rows=a and no.of columns=b...then total input size is a*b right?? .. because the program has to run a*b times to traverse through the entire matrix...hope you understood this....
@luismisanmartin983 жыл бұрын
You could say it is the general case of a quadratic polynomial
@178fahimahmed74 жыл бұрын
Really helpful , Plz 2nd and 3rd video .
@LeetJourney Жыл бұрын
Nice video! I have got a similar Big O video (10 minutes long) which teaches you everything you need for your technical interview.
@sandeepchouhan8383 жыл бұрын
Please make a vedio on some harder problems!!!
@kays35993 жыл бұрын
these teaching videos are really helpful. If you ever needed more ideas for content, you just found it... TEACHING. :) #keeponcoding
@mikaelaq.purugganan43672 жыл бұрын
"It's not about writing code anymore" I agree. I really need to grow and mature now. It's not really about 'just' writing a code now. aaah
@falconiere2 жыл бұрын
Awesome!!
@finelliott24402 жыл бұрын
Is this pseudo code?
@abelrevelation85664 жыл бұрын
Awesome video. You said when you have 2^0 to 2^n-1 ... technically is equal to 2^n I need help on the math behind this :).
@MJ7102874 жыл бұрын
Note that 2^0 = 2^1 - 1. Now assume 2^0 + 2^1 + 2^2 + ... + 2^(n-2) = 2^(n-1) - 1. Then 2^n - 2 = 2 * (2^(n-1) - 1) = 2 * (2^0 + 2^1 + 2^2 + ... + 2^(n-2)) by our assumption. Therefore, by the rules of exponents 2^n - 2 = 2^1 + 2^2 + 2^3 + ... + 2^(n-1), which implies 2^n - 1 = 1 + 2^1 + 2^2 + 2^3 + ... + 2^(n-1). Since 2^0 = 1, it follows that 2^n - 1 = 2^0 + 2^1 + 2^2 + 2^3 + ... + 2^(n-1). This is called a proof by induction. We proved that if the result is true for (n - 1), then it is also true for n. Additionally, we showed that the results is true for n = 0. Thus when n = 1 we know the result is true for (n - 1) since n - 1 = 0, so it must be true for n = 1 as well. We can continue this logic so that the result is true for any integer n.
@koshirou7Ай бұрын
U saved my life
@904hattrick82 жыл бұрын
I don't know if anyone will see this, but what about finding Big Omega?
@chienphung9633 Жыл бұрын
last example is quite tricky
@bruceslasher63743 жыл бұрын
14:04 It's 2^n x 1/2 Not 2^n - 1 But it doesn't matter
@РуменЙордакиев3 жыл бұрын
2^n x 1/2 = 2^n x 2^(-1) = 2^(n-1)
@luismisanmartin983 жыл бұрын
That is wrong. It is indeed 2^n - 1 (no parenthesis), you need to use the geometric sum, look it up ;)
@humdrumsnail10362 жыл бұрын
At 6:36 you miscalculated. It was supposed to simplify to O(N^3) because those were nestd loops
@АлександрЖарков-у9ш4 жыл бұрын
Cool, thanks
@vanshsindhu85594 жыл бұрын
1:20 I am viewing in 1.75x speed
@dubble_g2 жыл бұрын
would have been nice if u just retyped that code and then put it on screen instead of a low resolution photo but otherwise good
@SuperYtc13 жыл бұрын
Bik ohhh of n riiiiiii ??? (imitating my Chinese lecturer from university 5 years ago in computational methods module).
@Chmouss4 жыл бұрын
Me at every examen ... big O :')
@hamidbluri31354 жыл бұрын
I doubt about last one
@izzafraxene3 жыл бұрын
you are amazing
@andrews133 жыл бұрын
Perfect
@mercedesaker79474 жыл бұрын
Very good explanation, definitely learned from this. 👍🏻
@techslugz4 жыл бұрын
Dont you all think its crazy how you get good videos like this, and some (4) twat(s) who click dislike. I mean yeah, maybe they just dislike the video sure, but why click it, so toxic.. I mean fair enough he could make money via the videos but they are also massively helping potentially millions of people, if they are interested.