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.
Nice, perfect solution. I had to check if you were the author, haha.
The table is a mapping between the number of the bowling pin and the index of that pin in the output string: 'I I I I\n I I I \n I I \n I '
For example, pin #7 is the first character in the string, index 0. Pin #8 is at index 2.
For each pin to be removed, I replace that index in the output string with a space.
This version might be a little clearer:
Great, thanks!
Awesome kata! After reading some of the other solutions and refactoring my solution, I found an issue. Some of the random tests expect the output to be a number that contains only a portion of the given contaz sequence. Here are some examples:
whoa :slow-clap:
The
Returnstring
has been corrected, but theVisualize
portion still says8E3
is the result.This will add a space before every capital letter regardless of whether it is part of a camelcased word...
This comment is hidden because it contains spoiler information about the solution
It would be nice to mention in the description that the data of each Node can be accessed through the Node.value property. Took some experimentation to figure out the right property name.
Thanks for the clarification, I often forget that.
This!
Thanks!
Yes, the description is better now! Couple of suggestions to clarify things even more:
spaces
argument isFalse
, you should remove spaces from the"Answer"
.Overall, cool kata! I'm still a little confused about when to delete spaces from the input text though. That should be explained better in the description. Is the second example-response in the description correct?
charCheck("Cara Hertz", 9, false) should return [ true, "Cara Hertz" ]
Seems like it should return
[ true, "CaraHertz" ]
according to the actual test cases.I'm still not sure though, more clarification in the description would be helpful.
Whoops, meant to reply to you. See above ^
Loading more items...