2 ms·
Great clickbait title :) Big-O is a way to class algorithms/methods into similar categories It is distinctly NOT a profiling tool! O(n) is [almost] always be
by warrenm 5y ago
Great clickbait title :)
Big-O is a way to class algorithms/methods into similar categories
It is distinctly NOT a profiling tool!
O(n) is [almost] always better than O(n2)
Likewise, O(logN) is [almost] always better than O(n)
But just because you're comparing within rough categories doesn't mean they're the same
Crab apples are apples
Just like Northern Spies
But other than being "apples" ... they're nothing alike - one is about an inch in diameter, the other 3-4". One's crisp, solid, and mildly sweet-tart...the other is practically uneatable without tons of sugar
But they're not bananas
And that's what Big-O is all about - putting the classes or types of algorithms into groups
Sounds like the author had no clue what he was being told in college (which is concerning ... it's something I had explained by every compsci and infosys instructor and professor I had over the course of dozens of classes)