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.
Solved it the mathematical way.
This comment is hidden because it contains spoiler information about the solution
Glad you liked it - and you are correct with the wiki link.
console.log
do work on codewars. The log output is directed to the Output window.Not relevant for this kata.
New solution with a visited counter also solves this.
This comment is hidden because it contains spoiler information about the solution
Correct. Put in
if (steps > 100) return -1;
to avoid infinity loops for input that didn't have a solution.This comment is hidden because it contains spoiler information about the solution
I must admit I really struggled with this one. I would think a hinting link to valueOf would be suitable.
Thank you. Used it on a project calling modbus commands.
How did you find the solution with not checking the last 5 bits because of inaccuracy?
Do you really need an example test case for lower case r's, when the description clearly explains how to handle this?
Yes you are correct. I did figure there would eventually be some rounding issues when working with floats.
I have changed the test case to ignore the 5 last characters, because in the tests they represent a very very small fraction of the answer.
I also added some additional description and an illustrative image to make the kata a little more welcoming.
Not correct. It has test cases for both lower and upper case R's. The output name should be the same case as the input name.
Think it has been so from the start. But re-linking with github solved it somehow. Why didn't I try that, arrgh.
Loading more items...