Tower Breakers

Sort by

recency

|

414 Discussions

|

  • + 0 comments

    python

    def towerBreakers(n, m): if m == 1 or n % 2 == 0: return 2 return 1

  • + 0 comments

    There are 2 towers, each 6 units tall. Player 1 has a choice of two moves: remove 3 pieces from a tower to leave 3 as 6 modulo 3 = 0 or remove 5 pieces to leave 1

    But Player 1 has 3 possible moves: reduce height to 1 (6 modulo 1 = 0), reduce height to 2 (6 modulo 2 = 0), and reduce height to 3 (6 modulo 3 = 0). This challenge doesn't make sense

  • + 0 comments

    I dont understand a thing about this question. is it just me ?

  • + 0 comments

    Scala Solution

    def towerBreakers(n: Int, m: Int): Int = {
        // Write your code here
        if (m == 1 || n % 2 == 0){
                2
            }
           
            else 1
    
        }
    
  • + 1 comment

    Poorly written problem and explanation.