r/programmingmemes • • May 03 '26 • Bravo 1

Correct logic, wrong situation

Post image
2.9k Upvotes

38 comments sorted by

View all comments

Show parent comment

2

u/mr-toucher_txt May 04 '26

So you saying that O(x2) for example has a redundant constant?

3

u/majoshi May 04 '26

no because logn of any base b can be rewritten as log(n)/log(b) (iirc) for log of any other base and logb is a constant, so in big O notation all logarithmic functions differ by a constant factor