I think the author presented the idea of sqrt(n) just to make the picture more clear.

But, you can directly binary search from 1 to 10^6 in log(n) so that is not an issue.

Read more… (34 words)

Active In

Competitive Programming

Featured Contributions

comment in this discussion

I think the author presented the idea of sqrt(n) just to make the picture more clear.

But, you can directly binary search from 1 to 10^6 in log(n) so that is not an issue.

Read more… (34 words)