Big-O Notation in 100 Seconds
Вставка
- Опубліковано 17 гру 2019
- Learn Big-O Notation in 100 Seconds (of Computer Science). ⚡🔬
#compsci #100SecondsOfCode
Install the quiz app 🤓
iOS itunes.apple.com/us/app/fires...
Android play.google.com/store/apps/de...
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
My VS Code Theme
- Atom One Dark
- vscode-icons
- Fira Code Font - Наука та технологія
The kid crying is exactly how I feel when someone asks me about time and space complexity 😢
same
Keep this 100s project, it's amazing! 👏
That's how i feel if someone asks me if my code is efficient.
@@Fireship haha.. the best way to respond to a junior dev is senior saying he doesn't understand either
Same here
It's year 2030, computer science universities go bankrupt because everyone is learning from fireships 100s videos instead of lectures. Keep it up ! 😁
Yeye. I basically learnt basic js without a course. All I did was watch fireship vids.
@@ACodingWoof wow that's amazing...
@@vaisakhkm783 yup ikr
Watching One hour fireship video >> Learning one semester
@@justwaterweight ==
Dude! your materials are like O(1/n)... The more advanced concepts you take, the shorter and easier to comprehend your material is :) keep it up! you're doing a great job
I'm just asking here, but if you were to have code with the complexity of O(1/n), would that mean the program works less efficiently with fewer inputs than with greater?
Also, I doubt it's pragmatic, but is it possible to have an algorithm with the complexity of O(1/n)
@@arhamaneeq3685 I think that O(1/n) is not possible since the number of computations grows as the size grows..
We might use memoization to store some recurring intermediate results in cache but even then, there is still slight addition to the computational time...
Also, O(1) is the fastest time any possible computational operation can take... Having an algorithm that has a Big O of 1/n would mean that it's faster than O(1) which is an impossible task to achieve...
@@MsSuyash1995 maybe when quantum computing has general availability ;0)
@@MsSuyash1995 this seems kinda like O(1/n) to me:
the problem: your inputs are an array, you are supposed to return an element from that array with index greater than 500.
the algorithm to do it:
pick a random element from the array. Check if it is at index 500 or greater. If it is, return in, otherwise, try again.
Is this O(1/n) on average? Or given what you said about being faster than O(1), maybe it's O(1 + 1/n)?
@@mthf5839 No. Random number generation and array lookup based on index are both O(1) time complexity. Also this algorithm will loop forever for arrays shorter than 500, so there is no average time complexity. Getting the index of an array element based on its value is on average O(n) time. Also I don't get why you would bother getting an item from an array, when you could just check if the number is above 500 right after you generated it.
I'm so pissed off at this because it ends at 100 sec.
same here
99 sec.
@@mohanbarman5982 right
It is 100 seconds because it has O(n^2) with n=10 and a one second delay in the inner for loop since the bubble sort is executing on a Commodore 64.
It took me forever to understand this, even when I was taking data structures in college. I really like the way you explain this as it's very similar to CS50, the free course that Harvard provides, but you do it in 100 seconds.
Nice! I'll have to check that out
Can you explain my life in 100 seconds too? You're amazing man 🔥
He'd probably sum it up in less than 100 seconds, just saying lol
this taught me more than the weeks I spent watching tutorials on this
I will watch every single video this GOAT is making
From Application Development to Software Engineering to now Computer Science... Looks good for audience of this channel. Keep up the good work. Much needed video for people who are not from computer science and well explained from perspective of Computer Science and Engineering Graduate.
You explained this better in 100 seconds than my professors did in college over 5 months.
I'm jealous of any current CS students who have these videos... YOU HAVE NO IDEA HOW LUCKY YOU ARE!
After sharing the first #100secondsofcode video I made a comment wishing for this to be a series. I'm very happy to see it as a reality. Thank you
Awesome!
I'm really glad that we have people like you here in UA-cam, awesome videos with amazing quality and great knowledge.
Have you ever considered making videos about Programming Paradigms? Design Patterns?
I remember having trouble understanding how the Big-O notation worked years ago. This video will be so useful for students around the world, thank you !
Thank you. Had a whiteboard interview with logic questions and my UA-cam feed has been all about them, this is the first video to tell me what the maths was people kept using to show their thinking!! Big O notation, ahhhhh the relief and all in 100 seconds! You god
Wow, by far the best explanation that I've ever seen (thanks to the graphs). 👌🏻
I absolutely love the art style and of cos the way you presented!
Can you please please please make the 100 seconds series along with like x mins series for more in dept details?
I'm loving this concept of code in 100 seconds. Keep going please
Your Videos have the Best Visualizations! Thank You Fireship!
Seriously though, these 100 seconds are probably the most useful 100 seconds until now and for what I will be needing it.
Extremely great fun for this. Short, sweet and to the point with great visuals.
Do more of these videos! I think the format is awesome!
Maybe even a bit more than 100s wouldn't hurt. I presume it would a bit easier for you also to fit everything in.
Love the format, amazing as always.
These 100s' videos making me motivated to do one for study purposes. Really like it!
Was confused by a course I'm taking, and am relieved after seeing this. They really overcomplicated it, and you nailed it.
I love this. Your succinct explanations cleared up this topic for me. Thank you very much, liked and saved!
you have the gift to explain something allegedly complex in a simple manner. i salute you.
Love these videos keep them coming!
One thing about big O is that in some cases you'd actually want to use the less optimal algorithm. Crazy optimised search algorithms for example will introduce a lot of overhead before actually performing the search and this only scales well with big numbers where searching over an array that we know is gonna be just a few items long would be better off with a normal for loop.
This is way more helpful than my CS prof's lecture, thank you!
best 100 productive seconds I've ever seen, thanks man!
Amazing production value, thanks buddy.
This is really good content, i'm surprised you summarised it in such short ammount of time. Great work and keep going!
These short form videos really help me learn better than long lessons with power point slides, especially with my adhd.
Very well explained, thank you!
please please keep doing this great work, just amazing! thk u
loving this short daily clips..................waitin for more.
I have taken up this mission to watch all your videos and like it
This is so cool and visual... thanks mate!
AMAZING LESSONS !!! DREAM LESSONS!
The best video on the subject.
Thank you ,all the other online definitions made it so hard for me. But I finally understand what BigO notation means
not even kidding i watched this video about 30 seconds before i started my test that covered this, thank you for the short form!
Bro istg this dude explain things better and easier to understand
This was amazing really, you made it very simple to understand in a short time, thank you
yo thank you so much! That's literally the kind of teaching I'm looking for on youtube. This video was super efficient and taughtfull, you saved me some damn time man, I love you xD I feel so satisfied right now
I think I FINALLY understood it!
This is so cool. Perfect for reference
Just when i needed it, ty
This is amazing as always!! Please share the tools you use for making such amazing videos. Thank you for all your hardwork❤
Just amazing, please continue
Didn't knO this was gonna be a series, great idea!!
Thank you mate thank you so much❤️
This video is amazing explained so much in such a short period of time.
Really good video. Simple. Fast. Knowledge.
These videos are too good, keep it up!
Thanks for this! It would be nice to see a video on how to calculate the big O notation of functions. 🤜
WE WANT MOREEEEE! GREAT VID!
OMG after all this years I finally understand it%)
very high quaility video, as always. God bless
Thank you Jeff!
its so weird how i tried to learn this big o concept from various sources like udemy, youtube, coursera, etc since past few years but only being able to fully understand today at around 3:15 AM. Thanks a lot Fireship for helping an about to graduate cs student
I love it btw!! We want more 100s
Thanks, for explaining what it actually is. Everyone else dives into explaining the different kinds of Big-O Notations.
Dammnnn it's simple and to the point..cheers and happy new year 😊
Simply amazing
finally someone explained this perfecctly
This format is good!
Your content is easy to understand..pls continue good work..
You reminded me of my algorithm analysis and design classes in the university 📚😁
Ty for all 😁
Thanks for these 100s videos :)
I'm more impressed by the effort you put in making the thumbnails
Best 100 sec of my time.
Wow that's great explanation in just 100 seconds . We need more videos like these . 😅
Just excellent!
This is amazing explanation is such short time 😮
Thanks!
thank you for this
Really helpful, I always read about log(n) performance and had kind of the right idea about it in my head but wasn't sure if it was correct. Never bordered to check it online, so thanks for this awesome video :)
O(log n) one of the most efficient algorithms have it like quick sort. Others like merge sort or heap or tim sort (tim sort is used in javascript v8 engine used in node and chrome) have O(n log n)
@@lord12790 Sorry, quicksort is O(n log n) too in the average case, even O(n²) in the worst case. It is just preferred over the others because those have larger coefficients hidden in the O.
GREAT VIDEO.
Your editing skills are impressive.
Bro, for some reason, it's today that I understood what big O notates. (8 years as a software eng. Lol) thanks
yes thank you!
To the point 🙏🏼
Great content!
YES! Another one!!
I want more!
Are you serious this is the simplest and most succinct explanation EVER!
Hands down the best explanation 🫡
I remember doing a technical interview a few years ago and being asked about Big O and I was dumbfounded. I then studied up on it afterwards. This was the best explanation I have seen condensed into 100 seconds
And have you ever had to use Big O in you daily job? Ever?
@@winkbrace no not ever in 20+ years of programming, it just a tech interview question to weed out candidates
So far one of my favorite js programming channel
can you recommend others? I can't find more programming channels that cover angular/firebase , go fast enough and are not Indians (just don't like the hard to understand accents, I'm not native English) ...
Coding train, thenewboston cant think from the top of my head but this 2 r pretty good
Very important video
Please make an in depth series about algorithms and data structures
better than most of videos
Do more like this.
100s segments are excellent
You omitted the factorial O(n!)
This 100 seconds was taught to us in college for several hours, yet we didn't had this level of clarity
Thanks