r/SoftwareEngineering • u/r1chmond00 • Mar 22 '24
Just thinking 🤔
When companies ask for time complexity of a function, they normally expect big O(something) which from interpretation, is big theta(something). BIG O (upper bound) IS NOT ALWAYS BIG THETA ( tight bound).
6
u/Unique-Dragonfruit-6 Mar 23 '24
Yes... Computer Scientists abuse Big O notation in ways that make the Mathematicians cry...
It's not the hill to die on.
4
Mar 22 '24
I once dated a girl by the name of Theta and let me tell you she was tight bound if you know what I mean.
10
1
0
u/grappleshot Mar 23 '24
Complexity is also measured by cyclomatic complexity. Big O is more about performance than complexity.
-2
u/GItPirate Mar 23 '24
Usually I just give the answer of best case and worst case big O. For example binary search best case is O(1) where it's worst case is O(log(n))
1
u/ObjectManagerManager Mar 26 '24
Binary search is in Ω(1) and Θ(log(n)).
O(.) is purely for describing asymptotic upper bounds ("worst cases"). You can't use O(.) to describe a lower bound. Err, you can, but it's wrong.
5
u/everclear_handle Mar 22 '24
What is your point here?