You have to count how many letters of x are present in "sabbatical", for example:
"sabbatical"
if x was "cat", the score for x would be 3 and if it was "dog" it would be 0.
x
"cat"
3
"dog"
0
Is that clearer?
Our honor compared to the other CW users is shown in a different way now. If I'm not mistaking top 0.06% is the same as 99.5% percentile.
top 0.06%
99.5%
Already: 3- nextHappyYear (9876543200) ==> return (9876543201).
Edits have been made.
This comment is hidden because it contains spoiler information about the solution
Does your function return the expected result in sample tests? When trying to publish the server checks both main and sample test suites, and if you pass only 1 (or 0) of them, you can't publish the kata.
sample tests
Loading collection data...
You have to count how many letters of x are present in
"sabbatical"
, for example:if
x
was"cat"
, the score forx
would be3
and if it was"dog"
it would be0
.Is that clearer?
Our honor compared to the other CW users is shown in a different way now. If I'm not mistaking
top 0.06%
is the same as99.5%
percentile.Already: 3- nextHappyYear (9876543200) ==> return (9876543201).
Edits have been made.
This comment is hidden because it contains spoiler information about the solution
Does your function return the expected result in
sample tests
? When trying to publish the server checks both main and sample test suites, and if you pass only 1 (or 0) of them, you can't publish the kata.