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.
This comment is hidden because it contains spoiler information about the solution
A very poor-quality Kata overall, and it is obvious that the author of this Kata has put no effort in whatsoever to even try to make this Kata remotely presentable to the Community. I would strongly advise that you unpublish this Kata and rework it to make it much better than it is now before re-publishing it. A few things to consider could include: coming up with a unique idea and having full code coverage, etc.
Very close duplicate of at least this Kata (and quite possibly a few others!) which means that this Kata fails to present novel content to the user undertaking it. The lack of novel content in a Kata as an Issue is recognised as an official CW stance.
Your Kata needs more extensive test coverage to prevent easy cheap-cheat solutions and/or logically flawed solutions. The most common way to increase test coverage is through the inclusion of randomly generated test cases at runtime so please add these. The lack of test coverage in a Kata as an Issue is recognised as an official CW stance.
Incorrect usage of
Test.expect
causes any solution that returns a truthy value to pass all testsGreat one-liner. This solution has a space complexity of O(n) because an array is allocated. In place sorting solutions can have a space completity of O(1).
That was my first solution, but it does not consider input validation according to description:
"... accepts a string containing up to 26 unique alphabetical characters."
why did you use regxp to evaluate, simple > would be more elegant!
Its grate, but this is not correct solution, instructions where rather clear you shuld accept max 26 caracters. N
"I have developed an elegant solution to this problem."
1 minute later. . .
"Oh, there was already a method for that."
that make sense ;)
I did the same solution, but in addition I've added a regex to evaluate if we are having up to 26 lowercase chars. I think arg validation is important.
I don't think the
"too ##many tags" == ["many"]
one should work at all.This is why Ruby is beautiful.
Great job!
Just a couple of things, style-wise, that I can see: the return statement isn't required (it'll still output the string), and you can use single quotes for the string as well. The only time you really need double-quotes is if you need to do string interpolation or if there's going to be apostrophes and/or single-quotes in your string.
Loading more items...