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.
'you don't have to consider things like undefined, null, NaN, negative numbers, strings and so on.'
But as the Math object has been reset you shouldnt use Math.floor in the first method Math.round
.
Fixed and random cases with symbol characters are now tested. Closing.
yes, but in JS it is definitely harder now than in Python.
Good solution! It could use a little refactoring, but other than that - it's concise but not concise to the point of unintelligible.
Yes
This does not work correctly for negative numbers.
Standard Math object:
Math.floor(-1.1) === -2
This implementation:
Math.floor(-1.1) === -1
You are correct. I made mistakes. Just fixed them.
They did not change results. So no one noticed.
Thank you very much!
This comment is hidden because it contains spoiler information about the solution
If my testcode run correctly there should not be things like
ABA
. I modified the testcode from another kata I made which may have certain disconnected cases. Maybe I missed something. Did you see this type of disconnected areas in the tests?Thank you so much for pointing out the typo. I corrected it.
If there are two disconnected areas with the same letter, are they considered one territory or two distinct territories?
Consider for example the string
ABA
. Do the two As form two separate territories or one discontinuous territory?Also please note that there is a typo in the description. "chese board" > "chessboard".
Not an issue, but a suggestion. Anyway, I removed that test, as there were other complaints earlier about it.
This comment is hidden because it contains spoiler information about the solution
Yup, you got it right o_O
I created a fork with verbose comments to explain what is going on in this solution.
I hope I got it right...
Loading more items...