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 problem statement should either state that the integers are non-negative, or include tests for negative numbers. Handling negative numbers makes this kata little more interesting, so I would add a test case for negative numbers.
I heard that a higher kyu could mean that this challenge uses "Obscure" features of a language. But I would not exactly call regex an "Obscure" feature since it is used a alot for string validation, but its a guess.
I was able to get a passing solution, but discovered that it would fail for my own test case of 12000000. So I altered my solution to account for that and numbers above. So another agreement on a more robust collection of test cases.
I agree that ideally they should all be written in all languages available. Maybe we can implement a feature to allow sharing so other people familiar with other languages can add them to the original Kata, whichever language that happened to have been when it was created.
So far the kata I've authored, have all been ruby, simply because I'm not yet comfortable with jasmine testing, and that I am still learning an incredible amount by making kata.
this did not work
validParentheses(')');
The platform will introduce more languages in the future. Who would be able to create a kata for all supported languages in the future???
I agree, it would be interesting to see how a problem is solved in another language. But this can be a very complex task, if the API of one language does not support features that are built-in in another. Imagine a simple map/reduce inliner in Javascript. How it looks in Java using only standard library??? (I am no Java expert, maybe there exists a native counterpart...)
Okay it's fixed.
I was also going to propose this. Test cases over a million and with length multiples of three.
Pretty easy for me. Not too familiar with ruby, but def know my y'kno
Though I agree to some extent this will severely limit the numbers of submitted katas! I for one, cannot write in ruby and will likely not be able to deliver a working Ruby solution on most of the katas I write.
Coffeescript - in my personal view - shouldn't be a languague as it's "simply" a preprocessor. You can wrait it all in javascript and wrap it in "escape-to-javascript"-coffeescript.
I modified the kata such that it now generates a random name for each student (also making sure that the names are still unique). Thanks to the both of you for the advice.
Another agreement!
Agreed
I agree with JulianNicholls. it's straightforward to print the names and the total amount of money that each students has. once you have that, passing with the solution above is easy.
Random tests are not against the spirit of Code Wars. In fact, it is even part of the Test framework:
Returns a random number. Useful for testing dynamic values that can't easily be hard coded into solutions
Returns a random string. Useful for testing dynamic values that can't easily be hard coded into solutions
Loading more items...