We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Tower Breakers
- Discussions
Tower Breakers
Tower Breakers
Sort by
recency
|
112 Discussions
|
Please Login in order to post a comment
Solution that worked for me with an assumption that player 2 always mirrors player 1's moves:(if someone understands why we should assume that please explain)
if (m == 1) { return 2; }
no need to tell you how awful this problem description was, they even gave a contradicting example with the description of the "rules",
C# SOLUTION
if (n == 1) return 1; if (m == 1) return 2;
Here is - HackerRank Tower Breakers problem solution
This is one of the more awfully written and described questions I have seen on this platform.
If m == 1 and player 1 starts, then apparently player 1 does not have any remaining moves and player 2 wins??