Hacker News new | past | comments | ask | show | jobs | submit login

I had a technical phone screen done by an HR several times, or at least it felt like it was a completely clueless person. Once I could tell exactly why, when after he asked me what is complexity of binary search and I replied "O(log)" he asked what base? (for non-technical people reading: logarithms of every real base produce exactly the same O() result being different only by a constant factor).



It's been a while since I took a math class, but it seems like the logarithmic base is key to understanding what kind of problem you have and the type of solution needed. Comp Sci naturally uses 2, biology and finance tend towards e, etc.

Base 2 problems tend to require clever recursion and dynamic programming to solve, while the natural logarithm often requires calculus.

But then again, I'm not a mathematician - just what I took away from a broad undergrad.


Sure, if you are actually evaluating logarithm the base is very important. However, as I said, an entity designated as "O(log)" is exactly the same for every base so selecting a specific base here makes zero sense. Likewise, O(n^c) is as same as O() of any polynomial of power c, if somebody is writing O(3n^2 + 5n + 366) instead of O(n^2) - you know they don't quite understand what are they doing.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: