
Big O: How Code Slows as Data Grows
video description
Date: 2022-03-14
Related videos
Comments and reviews: 10
iamserda
wait a minute, even though the end result would have been the same, isn't it (using average instead of worst-case) 3N/2 + 3N/2 + 1. the only think happening 1 is one of the returns(mom_name or None). But the if statement occurs 3x, at each iteration. so technically, we end up with 3n/2 + 3n/2 + 1 = (6N + 2) / 2 = 3N +1 which leads to 3N(discard lowest terms) and eventually N(discard coefficient) .
I could be wrong. The end result is the same. I just think there is an issue with the explaination of the if statement as if it does not occur at each iteration but it does, it just happens to be false 2 out 3 times if the item you are looking for is at the end of this array. But that does not mean the if statement wasn't executed 3x.
just my 2 cents.
reply
wait a minute, even though the end result would have been the same, isn't it (using average instead of worst-case) 3N/2 + 3N/2 + 1. the only think happening 1 is one of the returns(mom_name or None). But the if statement occurs 3x, at each iteration. so technically, we end up with 3n/2 + 3n/2 + 1 = (6N + 2) / 2 = 3N +1 which leads to 3N(discard lowest terms) and eventually N(discard coefficient) .
I could be wrong. The end result is the same. I just think there is an issue with the explaination of the if statement as if it does not occur at each iteration but it does, it just happens to be false 2 out 3 times if the item you are looking for is at the end of this array. But that does not mean the if statement wasn't executed 3x.
just my 2 cents.
reply
nikoladd
O(N-2) is NOT one of those terrible things you try to avoid. It's the lowest power polynomial(apart from N-1 of course). It's one of the things you try not to run too much, but as far as algorithmic complexity goes it's pretty good.
Algorithms of complexity O(N-3) are a dream for many real world tasks... like finding most points in space that are on the same line. ..and this is N times worse then O(N-2) for those that didn't get it.
reply
O(N-2) is NOT one of those terrible things you try to avoid. It's the lowest power polynomial(apart from N-1 of course). It's one of the things you try not to run too much, but as far as algorithmic complexity goes it's pretty good.
Algorithms of complexity O(N-3) are a dream for many real world tasks... like finding most points in space that are on the same line. ..and this is N times worse then O(N-2) for those that didn't get it.
reply
Ozzy
Excellent video! It's interesting how when building blockchains and stuff (think proof of work), higher time complexity is better for building secure blocks, because it means it takes time for adversaries to attack the data structure. O(.) is important, but its interpretation depends on context :)
reply
Excellent video! It's interesting how when building blockchains and stuff (think proof of work), higher time complexity is better for building secure blocks, because it means it takes time for adversaries to attack the data structure. O(.) is important, but its interpretation depends on context :)
reply
Abstract
7:57 -mathematcal detritus- and -chaft-. I hope your aware we rigorously define and understand these concepts for our own enlightenment. Theres definitely a place for people who can give an intuition about it, like yourself. But don't bash us for trying to understand it completely.
reply
7:57 -mathematcal detritus- and -chaft-. I hope your aware we rigorously define and understand these concepts for our own enlightenment. Theres definitely a place for people who can give an intuition about it, like yourself. But don't bash us for trying to understand it completely.
reply
Boris
superb talk this guy is a legend. its amazing how some people overcomplicate things when its really simple. Im not sure if they do it cuz they like thinking they are so great or smarter than other people or they just dont know any better. anyways 30 mjnutes well spent
reply
superb talk this guy is a legend. its amazing how some people overcomplicate things when its really simple. Im not sure if they do it cuz they like thinking they are so great or smarter than other people or they just dont know any better. anyways 30 mjnutes well spent
reply
iamserda
Oh, this is TERRIFIC. I am learning this to prep for upcoming interviews in tech and for a guy without a background in pure math and who took his last math course 13 years ago, I NEEDED THIS.
reply
Oh, this is TERRIFIC. I am learning this to prep for upcoming interviews in tech and for a guy without a background in pure math and who took his last math course 13 years ago, I NEEDED THIS.
reply
greenie62
well, we know who at least one of the people are who clicked the dislike. i think we can get a O(log(n)) divide n conquer to figure out the other 3
reply
well, we know who at least one of the people are who clicked the dislike. i think we can get a O(log(n)) divide n conquer to figure out the other 3
reply
Chandan
I had trouble understanding big o but after this video, I really understood each topic, really helpful and quality teaching from freecodecamp -.
reply
I had trouble understanding big o but after this video, I really understood each topic, really helpful and quality teaching from freecodecamp -.
reply
OJAS
G.H. Hardy introduces Big - O, Little - o, and tilde - comparators in his Pure Mathematics, and Number Theory Texts. Wkipedia has a page on these.
reply
G.H. Hardy introduces Big - O, Little - o, and tilde - comparators in his Pure Mathematics, and Number Theory Texts. Wkipedia has a page on these.
reply
Dev
with the number of comments is just only 31 i-d say i found a hidden gem. this is what i was looking for! thanks for sharing!
reply
with the number of comments is just only 31 i-d say i found a hidden gem. this is what i was looking for! thanks for sharing!
reply
Add a review, comment
Other channel videos















