DEV Community

Discussion on: What is Big O Notation?

 
artoodeeto profile image
aRtoo

ohh. I really thought its O(n) because it will try to evaluate every ifs.

Unless for switch statement, compiler will try its best to optimized and it will be much faster lookup. Im talking about c++ btw. thanks