Tower Breakers

  • + 0 comments

    js single line solution (also to make it a little more fun, chose to do it with no if statements):

    const towerBreakers = (n, m) => ((m==1)&&(2) || (2 - n%2));