Hey everyone. In this video, I’m going to give you an introduction to Big O notation and time complexity. These concepts basically give you one way of describing how the time it takes to run your function grows as the size of the input grows. To see what I mean by that exactly, let’s take a look at a few examples here. First of all, let’s say you are given an array like this and let’s say that this array could be of any lengths. It could be one hundred elements long, a thousand elements long or even one hundred thousand elements. And let’s say you want to write a function that takes this array and returns the sum of all the numbers in this array. So, in your function you wanna add up all the numbers of this array and returns the sum. And that function might look like this function right here and I’m gonna use pseudocode here to write this function. So, first of all let’s define our function that gonna be called find sum which is going to take given array as input and then inside this function first of all we gonna initialize a variable called total to 0 and then for each i in this given array or for each number total to 0

Hi, have you seen the Berlekamp–Massey algorithm? The time complexity is defined as O(n^2), where n is the input data. Can I asume the same space complexity?

Thank you so much for explaining this. I have a quiz on Big O analysis tomorrow and I was completely lost before watching this video.

really nicely done with painstaking detail and examples – thank you

Thanks man u made my day! I was stuck at this topic at my college and u made it easy for understanding. Please make more videos on data structures.

17:41 – how to find time complexity

This is by far the best explanation about such topic. Really thanks!

I really request you for the BigO video. Please do…

thanks

Excellent!!

I just want some more video on this topic🙌💯

Great explaination YK👍

It's a shame for me that I have worked with various types of projects but I don't know basic things like this, thank you, you just made my day! 🙂

perfection for a beginner 👌

The mathematical rigorous explanation of Big O Notation would be much appreciated, brother. Thank your for the videos. 😀

INCOMPLETE

Don't waste 36 mins

!

I was about to Google Big O Notation when this video appeared in my recommendation and it clears out everything!! Many Thanks!

This is an amazing series man. You really explain soo good. Want to learn everything from you. Lots of love from India 😍😍

This just might save my sem.

Thanks a lot this was great. Would be perfect if there was a 6min version of this, kinda wordy and you lost me many times .

YK, just wanted to say how much I appreciate you for dedicating your valuable time and knowledge to the youtube community of developers. I am starting out fresh as a software developer and CS major this fall. Your videos are excellent learning tools are are helping me to grasp the discipline so thanks man!

T = c1 * n^2 + c2 * n^2 what will be the Time complexity?

Superbbb great

CS Dojo,

Can you make video on binary tree and avl tree and heap?

If all elements enqueued and all elements dequeued in circular queue then front=0 and rear = size-1 which is the condition of full queue but it is empty .why???

Thanks a lot, YK, you are such a good lecturer, i learned more here than my graduate classes!

Awesome ! Thank you for the video

Is this an okay way to implement the find_sum_2d function in python?

def find_sum(arr):

total=0

for i in range(len(arr)):

for j in range(len(arr[i])):

total+=arr[i][j]

return total

let me know if theres an easier way

You are soooo good i can see why Google hired you. Thanks for the explanation. It is been a while since i needed to remember all of this and it just pops in my mind when you explain it like that.

Thanks!

Awesome explanation! Love this

This video is still understandable in 3x speed, and barely understandable in 4x speed. You really ought to talk faster, or to upload the video at an edited speed. The best speed I found was 2.5x

This video is a gem

Big backch00di ha. Yee too.🤔 😤

python is worse than pseudocode. there i said it.

grabs popcornWhat tool is being used to do the live illustrations and click-to-show coding? Thanks.

Very good. Thanks!

Hey Dojo, it was pretty nice explaination looking for more videos on algo and ds..

Is finding the fastest growing term actually the limit of function T when n goes to infinity?

How do I calculate while loop?

Thank you for this video, I will be keeping up to date with you data structures class just as some extra help as I just started data structures class and want to learn as much as possible

Excellent dude, I wish, I would have a teacher like you.

THANK YOU FOR THIS VIDEO CANT UNDERSTAND MY PROFESSOR BUT BRO YOU NAILED IT!

Excellent explanation

14:41 if you're removing all the coefficients then the 1 will also be removed.Instead of that you may write the function as

0.115 * x to the power 0 so that variable x remains according to the rule(anything to the power zero is 1).

we wait more about Algorithm and DataStructure from you and thanks for your effort and your simple way

is this part of measuring complexity

i got a book

which is very expensive in my country

some bunch of experts and phds wrote it

trust me , the book is just bunch of shittiest explanations i have ever seen

now i feel you taught me this for free

and its blessing for me

Thank you ♡♡♡

Helpful presentations however the empty boxes you show are kind of annoying. It's better when one can look at the entire code in a glance.

It's clear you know this material, but you spend far too much time tediously explaining the same things over and over. This could easily have been 10 minutes or less.

I wasted my tuition fees.

Why did you call that array 2D when it contained 3 arrays? Isn't that supposed to be 3D? Sorry for the noob question…

Thanku very much such a nice explanitaion ..day after tomorrow is my exam and now the concept are getting clear 😀😀😄😃🤟🏻

👍👍

Makasih kk

谢谢小哥哥讲解！很清晰！

24: for loop runs n+1 times wouldn't that be written n+1*O(1)?

Excellent video!. I love the way you narrated the Big O Notation and Time Complexity with good examples. Thanks!

It helped. KIU.

I want to find Big-O notation complexity step by step…Anyone help me …?

I've to complete my assignment…right now

I wish this series could continue forever. 30 minutes of CS Dojo teaches more efficiently than all the classes at my university combined.

ok this video makes me subscribe this channel.

A very good and detailed explanation of Big O notation and time complexity. I'm a college student and I took Data Structure course before but the professor was suck so that I end up did not learn any knowledge about Data Structure. After I watched this video, I really hope that you were my professor at the time that I was learning Data Structure. Excellent video.

If only had x1.5 speed in real life lectures

22:30 isn't the for loop O(N)

Love all ur vids!💜

need to learn this an interview, best decision to click on this video

{}{}{}{{{{}}{{}}}}}😑

lol oooookay slow down their Asian kid. really living up to that stereotype

very nice explained!

Have an exam tomorrow. It will have some Big O, I feel so much better about it after this video. Thank you so much.

CS Dojo, you need to create your own MOOC or something. I swear to god, I would drop cash to buy your course. You explain everything so succinctly and clearly. You are god-tier at explaining this stuff. I WILL GIVE YOU MONEY!!

老公，我太可以了吧

Great tutorial! Very Helpful! The Instructor is very knowledgeable about the subject and presents the information very clear and concisely, more youtube tutorial presenters should learn to focus on this style presentation format. Thank you for this very helpful video! Sub/d!

{{ : ]__~~ robogenus }}

Love you homie 🙏🏿

naming the functionspeople: SumOfArray

CSdojo: StupidFunction.

as you do, to make those grids of your black background video. in general how are you doing?

please.

CAST IN THE NAME OF GOD, YE NOT GUILTYBIG O, ACTION!!!

Thanks for the great video. Would be nice to decrease the number of ads though!

Thank you

sir if 2D array elements are not of same length then how can we find big o?

I am not a computer science student, I have been struggling to understand BIG O Notation for month, this solve this in the simplest best of way. thanks a million

Too Good

Hey , did you know your video was used here – https://www.youtube.com/watch?v=T2sFYY-fT5o ? I was shocked …

OMG! That was an amazing tutorial. Thank you so much

I‘m bit of confused. The for-loop part, in my textbook, shows it takes 2n ops. Also, for those operations,such as Variable = 10, takes 2 ops. Would you mind describing it a bit more? Thanks a lot

Great video! It would have been even better if you provided new code for T_4 -; to clarify exactly the way the code was structured .

wow u are good at explaining things nice and love it

please do a mathematical explanation video!!! really appreciate what u have done here!

**GOD level explanation**Thank you very much!

Having an exam with big o today and your vid saved me . 🙏🙏🙏

Thank you so much! I learned so much from this video!

Wow that helped so much, thank you – I am glad I took the time to watch it!

My internet charge is recovered after watching this video

Awesomeness, nest explanation I have seen.

Really awesome explanation.

I learned a lot from you.

Thank you

Wait .. where did A and B come from? What do they represent? It was never explained.

Thanks for the amazing video, I appreciate it a lot. I have one question: when you were adding to the total you were doing total += i . This would add the indexes from the array to each other, not the values. Shouldn't it be total += array[i] ?

Plz upload the videos of theta notation & omega notation