1 Comment

O(sqrt N) algorithms are fascinating. I have some examples I want to show also, where we can take advantage of the structure of the problem and come up with a solution that might be not as efficient as O(logN) but will be more efficient than O(N).

That middle point often requires some cleverness and a good understanding of the problems. I think it's good that you wrote about this. It can be a game-changer for someone trying to craft some good old ad-hoc solutions.

Thanks for sharing!

Expand full comment