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 description talks about ASCII-Values for input and output. ASCII has values from 0 to 127. Yet, the last input character of the first test example has a value of 255.
My code looped forever until I figured this out, because that character does not have an ASCII value. [ In Swift: Character(UnicodeScalar(255)).asciiValue == nil ]
Please change the description.
This solution has a time complexity of O(n) + O(n), while a simple for-loop with a variable has a time complexity of O(n). This approach is clever, but not the best practice in terms of performance.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ruby-Translation kumited.
Please check and approve.
Thanks
Ruby-Translation kumited.
Please check and approve.
Thanks
Ruby-Translation kumited.
Please check and approve.
Thanks
Ruby-Translation kumited.
Please check and approve.
Thanks.
Uhh I overlooked that "different" part. Sorry for that!
Expected: [70001, 70009, 70061, 70079, 70121, 70141, 70163, 70241]
instead got: [70001, 70009, 70061, 70079, 70121, 70141, 70163, 70207, 70241]
70207 is a prime number according to [http://www.mathsisfun.com/numbers/prime-number-lists.html]
Also it is a numeric palindrome.
So my solution should pass the test...
(I'm using Ruby)
Really enjoyed this kata.
Maybe you could create a second kata that extends the class FileMaster created in this kata by adding validation of the passed filepath when creating a new FileMaster object.