You are viewing a single comment's thread. Return to all comments →
" //PANDEY JI
class Result {
public static String counterGame(long n) { // Write your code here int c=0; while(n!=1) { if((n&(n-1))==0) { n=n>>1; } else{ n=n-Long.highestOneBit(n); } c++; } if(c%2==0){ return "Richard"; } return "Louise"; }"
Seems like cookies are disabled on this browser, please enable them to open this website
Counter game
You are viewing a single comment's thread. Return to all comments →
" //PANDEY JI
class Result {