Tower Breakers

  • + 0 comments

    public static int towerBreakers(int n, int m) { // Write your code here int result=0; if(m==1){ result=2; }else{ if(n==1){ result=1; }else{ if(n%2==0){ result=2; }else{ result=1; } } } return result;

    }