DEV Community

Shathish
Shathish

Posted on

Answer: What would cause an algorithm to have O(log n) complexity?

I have to agree that it's pretty weird the first time you see an O(log n) algorithm... where on earth does that logarithm come from? However, it turns out that there's several different ways that you can get a log term to show up in big-O notation. Here are a…

Top comments (0)