in Algorithms retagged by
2,892 views
0 votes
0 votes
in Algorithms retagged by
2.9k views

1 comment

100n2 < 2n

For n= 15, 100n2 run faster than 2n  i.e. 22500 < 32768

0
0

1 Answer

9 votes
9 votes
Best answer
At $n=14$, $2^n-100n^2 = 2^{14}-100*14^2 = -3216$

At $n=15$, $2^n-100n^2 = 2^{15}-100*15^2 = 10268$

So at $n=15$, $2^n$ becomes greater than $100n^2$
selected by

2 Comments

But this becomes a preety easier when we use C/C++.

are we allowed to do so in GATE :P ?
0
0
No, just use calculator and a bit of binary search manually, I found it through that only.
1
1

Related questions