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.
- Prepare
- Algorithms
- Game Theory
- Kitty and Katty
- Discussions
Kitty and Katty
Kitty and Katty
Sort by
recency
|
29 Discussions
|
Please Login in order to post a comment
I must be missing something
Test Case 1: N = 3, so there are three blocks labeled 1, 2, and 3. No matter how Kitty makes the first move, Katty will win. ( Not so ) If kitty chooses A=1 and B=3 on the first move and inserts a block labeled -2. the set of blocks becomes {-2, 2}. Katty then may choose the final result to be 4 or -4. The game ends Kitty is the winner..
Here is Kitty and Katty problem solution in python java c++ and c programming - https://programs.programmingoneonone.com/2021/07/hackerrank-kitty-and-katty-problem-solution.html
what a shit question. you know it's a trick question hiding behind unnecessary complex words when they dont mention how to choose A and B. i hate it. kitty and katty, go play better games ffs.
The trick is to check for any number N, what the values for
N % 3
and-N % 3
are. Then, think about what it means for the last round.Wow, this is a really bad game.