Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Logic behind TROO1 Trinity 2014 ( Notorious Gunner ) ?

$
0
0

I have seen many solutions and they all look like this :

int f( int x)
{ int ans ;
    while ( x > 1)
    {
     ans++ ; x /= 2 ; 
    }
    return ans ;
}
final_ans = max ( f(a) , f(b)) ;
where a and b are no.of rows and no.of columns .

I want to know the logic behind it ?


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>