What is it about big O notation that is so hard to understand for people?Despite being a fundamental concept in CS, so many CS graduates think they understand what big O means, but when they try to explain it they are completely wrong.For example pic related, almost every statement in the "explanation" is incorrect.
>>107723015Get a job
>>107723096What do I need a second job for?
>>107723160To replace your first job of being bestest good boy point getter.
>>107723015The hardest thing to understand about "Big O notation" is its use case. It only tells you how well an algorithm scales instead of telling you how well it runs, an algorithm with worse big O notation can run faster. The other issue is that it takes the hardware out of the equation, binary search and the "cache friendly binary search" have the same big O notation, but the cache friendly one not only runs faster, but it also scales faster.
>>107723160Blacked.com cleanup crew doesn't count.
>>107723205>It only tells you how well an algorithm scales instead of telling you how well it runsWrong.>>107723187>>107723238That is not my job.
>>107723257Oh really, tell me what you can infer from knowing that Quicksort, Mergesort, Shellsort, and Introsort all have the same Big O notation in the best case.
>>107723257Are you the same idiot that ruins every daily programming thread?
>>107723303Wrong.>>107723299>Quicksort, Mergesort, Shellsort, and Introsort all have the same Big O notation in the best caseMeaningless claim. Mathematical gibberish.
>>107723015I'm not even a programmer but I get it:O(n) is a function dictating the required processing time based on "n", the size of the input.So for example, if I were to say O(n), and the processing time is 10s for n=1, here's what you'd get:n=1, O(1) = 10s*1 = 10sn=2, O(2) = 10s*2 = 20sn=9001, O(9001) = 10s*9001 =~ 90ks etc.If the function was O(n^(3/2)) instead:n=1, O(1) = 10s*1^(3/2) = 10sn=2, O(2) = 10s*2^(3/2) =~ 28sn=9001, O(9001) = 10s*9001^(3/2) =~ 854ksSo if "n" is large you'll probably want to stick to functions that grow slower, such as log(n). But if "n" is small you'll probably want to look at the time necessary to run when n=1.
>>107723367>O(n) is a functionWrong>n=1, O(1) = 10s*1 = 10s>n=2, O(2) = 10s*2 = 20s>n=9001, O(9001) = 10s*9001 =~ 90ks etc.Wrong wrong wrong.
O(n) describes a function's upper bound A function f(n) is O(g(n)) if there exist positive constants M and k such that 0 <= f(n) <= M * g(n) for all n >= kTHERE OP you can stop sperging out now
>>107723401Get a job.
But how will this help me create a new GET endpoint for return number of sales?
>>107723493Correct.>>107723499see>>107723160
>>107723015>pic related, almost every statement in the "explanation" is incorrectNo.You are wrong.Kill yourself.
>>107723205>an algorithm with worse big O notation can run fastercan********!!!!!!!!!!!!!!
>>107723401Calm down, autist.
>>107723493>0 <= f(n)Do you even know how retarded you are?
assume that n is the size of a dataset. O(1) constant time, and does not grow based on n. this could be returning the size of the dataset, if it is known. O(n) is linear time, and it means essentially any constant operations applied to each of the dataset. this could be looping over it 100 times. as n grows so do the operations. O(logn) is something that is always less than O(n), but still grows as n grows. the classic example is binary search. O(n^m) is for each element in the dataset n^(m-1) operations are applied to it. the only other one that is real is O(n!) and this is just brute forcing combinations, an example would be the traveling salesman.
>>107723205>an algorithm with worse big O notation can run fasterCorrect. Quicksort is O(n^3) in the average case and bubble sort is O(n^2), yet quicksort sometimes runs faster.
>>107723652>You are wrong.Wrong.>>107723804>O(1) constant time, and does not grow based on nWrong.>O(n) is linear time, and it means essentially any constant operations applied to each of the datasetWrong.>O(logn) is something that is always less than O(n)Wrong.>but still grows as n growsWrong.Clearly you know next to nothing about big O notation, just like the redditor in OP's pic.
>>107723015BigO notation can be understood in O(LogN)2¥ time. Basically you need to be naturally exponentially asian.
>>107723367big O has nothing to do with timeyou can't make generalizations like this
This autistic shit is for no code retards. (YOU) would save years of your life if you actually just fucking wrote code instead of obsessing over semantic minutiae. Fucking spergs.
>>107723928What he did was specification not generalization. The opposite of generalization.>>107724013>understanding the most basic CS terms is for no code retards
>>107723850If that's not it, then what is?
>>107723928>big O has nothing to do with timeIt has EVERYTHING to do with time.
>>107723257>UMM AKSHUALLY THAT'S NOT MY JOB OKAYYYYYY
>>107724129What point in particular are you inquiring about? Your question is unclear.
>>107724122This is all you need. Now kill yourself.
>>107724184This image is incredibly wrong and unbelievably stupid. The person who made it didn't have a clue as to what big O notation stands for
>>107724184Actual candidate for one of the worst illustrations of a math concept ever made.
Non-whites can't comprehend Big-O notation. They might be able to recite it, but they never truly understand it.
>>107723015In the real world O(1) can be slower than O(log n). Some trees are faster than hashmaps in practice.
>>107724256In the mathematical world too. Literally nothing about the concept implies that a member of O(1) is faster than a member of O(logn), not even asymptotically.
>>107723367>I get it>every conclusion is wrong
>>107724268>>107724256Also you needing to specify "in the real world" implies you don't understand what the concept means, i.e. what big O stands for. It's not just the real world.
>>107724268>not even asymptoticallyYes even asymptotically
>>107724256You can make that claim for all time complexities.
>>107723015This is a good explanation.
>>107724289Wrong.
>>107724316Wrong. Nearly every sentence of the "explanation" is incorrect, the person demonstrates little to no understanding of what big O notation stands for.
>>107724122>O(n) is a function dictating the required processing time based on "n", the size of the input.how is this not a generalization of the concept in terms of timeanyhow, it's wrong>>107724137no it's notbig-O is just the upper bound as your input becomes sufficiently large. it has nothing to do with time.
>>107724333>Nearly every sentence of the "explanation" is incorrect,Prove it
>>107724353>O(1) is constant time, which means it doesn't take longer as the input size increasesThis is incorrect. A function that takes timef(n) = 1000 - 1000/(n + 1)is O(1) yet its execution time increases with input.
>>107724401That function would be O(n), not O(1)
>>107724401>is O(1) yet its execution time increases with input.But it doesn't. It decreases instead
>>107723015>>107723257deja vuhow often do you make this thread opI remember seeing an anon have a melty over this replying>WRONG WRONG WRONGto every post in the thread on at least one earlier occasion
>>107724442Learn basic arithmetic
I feel like I saw this exact OP with the same Wrong. poster like 6 months ago.Really inane stuff on the website today guys.
>wahhhh the intuitive explanation did not talk about sets constants and limits this will not stand