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.
The mathematics are tricky on this one. Definitely harder than 7 kyu. More like 5 or 6 IMO. (Full disclosure: I may just be a little bitter that my first solution wasn't optimal.)
Empty array seems to fit the given defintion of "nice" (i.e., "an array where for every value n in the array, there is also an element n - 1 or n + 1 in the array.") For every value of an empty array (i.e., none) there is also an element n - 1 or n + 1 (i.e., none). Should either change the definition and instructions to specify that the array is non-empty or change the test so an empty array returns true.
A negative index will eventually throw a NullPointerException when the nodes run out.
The description does not adequately describe the task. Should return true only if every letter from part1 and part2 is used in generating the input string. If this requirement is to be derived from the sample cases, then a sample test case should be given to show that leftover letters should return false.
To me, "latin letters" would normally mean letters with or without diacritics. Based on the description, I would expect "naïve" to return true.
For those (like me) who could not understand the description, the following is used to encode the message (no spoilers, just clarification):
The goal is to write a function that reverses the above process to decode the message.
Will this miss the case where the first letter of the sentence (uppercase) is also the first letter of the name (lowercase)?
For some reason I thought I could pull the 0.5 out of log in the numerator. I got lucky that it passed the randomized tests. I redid it.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
неоправданное усложнение
Agree with all of the comments. I eliminated the fullName field only to find out the tests verify its existence and public accessibility. Why?!
In Java, the tests produce values that cannot fit in a long data type. Instead the test values are being truncated. Either (1) the tests should be limited to ensure that the output will not overflow or (2) the return type should be changed to something that can hold the output (e.g., String or BigInteger).
I've swapped assertion arguments.
Loading more items...