Tower Breakers

Sort by

recency

|

413 Discussions

|

  • + 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.

  • + 0 comments

    This problem is basically a trick. Why would you have this kind of riddle problem in an interview.