Powerful Tom cat can catch a lot of mice every day, in order to show his naughtiness and generosity, let mouse number off, first batch eats the numbers of single. Then re-queue, The second batch still eats the numbers of single. The third batch is the same, until there's only one left, and it can survive.
Can be changed to:
Powerful Tom catches a lot of mice every day. But in order to show his naughtiness and generosity he always lets one mouse go. First he eats each mouse in the odd positions, rounds up the remaining mice and repeats the process, until there is just one mouse left.
Still clunky but I didn't want to change the structure.
Powerful Tom cat can catch a lot of mice every day, in order to show its naughtiness and generosity,
It appears the word its refers to Tom, yes? If so, use the word his, not its. That was immediately confusing.
Put a space between position and to where you have positionto
So... is Jerry a mouse or a rat? They're not the same thing, and if we're talking "Tom & Jerry" here, he is certainly a mouse.
Please consider completely starting over in describing the steps to take. This is the main ISSUE here. Have the friend read the description (without knowing what it's supposed to mean) and then have them explain it back to you.
10000 random tests is too much and solutions starts to look like micro-optimization since even good solutions take like 10 seconds. If you want to test for performance, you need to add a performance tag.
not a kata suggestion
Can be changed to:
Still clunky but I didn't want to change the structure.
Your less idiomatic solutions using add1 and sub1 intrigue me.
I wonder if this style disregards efficiency though.
Needs
performance
tag.Requires
O(log n)
solution;O(n)
won't do. That's ok, but solvers deserve fair warning about that.Powerful Tom cat can catch a lot of mice every day, in order to show its naughtiness and generosity,
It appears the word
its
refers toTom
, yes? If so, use the wordhis
, notits
. That was immediately confusing.Put a space between
position
andto
where you havepositionto
So... is
Jerry
a mouse or a rat? They're not the same thing, and if we're talking"Tom & Jerry"
here, he is certainly a mouse.Please consider completely starting over in describing the steps to take. This is the main ISSUE here. Have the friend read the description (without knowing what it's supposed to mean) and then have them explain it back to you.
I changed some descriptions, is it getting better?
solved.
This comment is hidden because it contains spoiler information about the solution
solved.
The input range should be increased because of this.
10000 random tests is too much and solutions starts to look like micro-optimization since even good solutions take like 10 seconds. If you want to test for performance, you need to add a
performance
tag.Needs fixed test with
n
being a power of 2 as an edge case. They only appear in the random tests.The description is totally incomprehensible. I still have no idea how it could be related to what's tested.
solved.
Needs Random Tests.
Loading more items...