Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I'm trying to figure out n = 12 and this is how to get 9 and 3
n = 12
Alice Turn: Alice = 1, Bob = 0, Remain = 12 - 1= 11
Bob Turn: Alice = 1, Bob = 1, Remain = 12 - 2 = 10
Alice Turn: Alice = 5 + 1 = 6, Bob = 1, Remain = 12 - 7 = 5
Bob Turn: Alice = 6, Bob = 1 + 1 = 2, Remain = 12 - 8 = 4
Alice Turn: Alice = 6 + 1 = 7, Bob = 2, Remain = 12 - 9 = 3
Bob Turn: Alice = 8, Bob = 2 + 1 = 3, Remain = 1
Alice Turn: Alice = 8 + 1 = 9, Bob = 3, Remain = 0
Ranking is too high, it should be a 7.
Nice kata but it's not a level 5 at best it's an easy 6.
This kata is more difficult than an 8!
This comment is hidden because it contains spoiler information about the solution
OK I have it now. 10 guesses is sufficent to solve any number between 1 and 1000!
Thanks for your help.
OK,
So I have 10 guesses to figure out a number between 1 and 1000: Lets say the number to be guessed is 345.
Now my first guess is 500 obviously too high, I then refine my guess to pick a random number between 1 and 500.
I continue refining the range of the guess depending on the result of the previous guess. So for example, my second guess is 200 which is too low then my third guess will be between 200 and 500. One can easily use up the 10 guesses without reaching the correct number in 10 guesses. It is not possible to make it more efficent than that!
So my issue is still boils down to what to I do if I don't guess the correct number within 10 guesses?
I have a solution to this kata, it works fine when I guess the number within 10 guesses. However I can't figure out what I'm supposed to do if I fail to find the number within 10 guesses.
For example this is the message I get: "you guessed 604, but the number was 600: expected 604 to equal 600"
Any suggestions as to what I can do to finish this kata will e gratefully accepted.
This one has me totally stumped:
I have no idea how you can get sum(2) = 22 and sum(3) = 50 from the formula given.
Can someone explain it to me?
I think this is more than a level 7.
This comment is hidden because it contains spoiler information about the solution
I'm not sure about this Kata, it is too easy to google a valid solution (that's what I did, so I did not submit my solution). If one was to solve it from scratch then it would be far more difficult than a level 6!
This comment is hidden because it contains spoiler information about the solution
See rule 6: https://www.geeksforgeeks.org/coding-standards-and-guidelines/
Coding the solution was easy, the difficult part was figuring out what was meant by sumax.
Hint the table is a countdown version of the example table.
Loading more items...