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.
More examples:
Reference solution is definitely wrong:
The expected value doesn't even loop in the RDS text, so it couldn't be the correct value.
Random tests sometimes do not input any text bits before requesting the concatenated string. This case has never been specified.
I think their point was that you shouldn't do one-liners like this for redability reasons (also, isn't it better to just use the function directly, in real code, instead of redeclaring it just to... Rename it?)
But from a solution standpoint, this is amazing
The last suite was not explained in the description
Other than that, it is not clear what you mean by this:
How is using the standard library instead of reinventing the wheel not best practice?
one person solving it as expected doesn't mean the description is clear enough...
Yeah, but I don't really know how to put it, I'll try some things. But on the other end, there's someone that has achieved it, so that's a good start.
that's better but you still have a part of the rules that is only in the examples.
Yay! someone finally understood my kata! And you have the same solution as me line by line (it's just the variables that change)!
' not relevant ' is there to point out that if a text repeats, what has come before doesn't matter, see my edit as I added comments to the examples.
Also I don't understand the memo thing, try reading the comments I made, see if you can understand.
Ok, that's it. Just explain what is the constraint to clear the list.
By the way, why the
' not relevant '
thing? Especially with leading/trailing spaces? I don't see the point (or it would require a new argument or function, to pass a list of forbidden informations.)EDIT: and don't forget to explain if we are supposed to clear the memo too.
I think I see now what you mean:
The 1st
get_text()
doesn't clear the list, it's just that the first three lines will make the concatenator realise the text loops (*music * and #1). So in the list,music
and#1
are stored and whenget_text()
is called, it returns that.But on the 4th input, it receives something that isn't in the list (
"song" not in ["music ", "#1"]
), so it clears that, and starts a new list containing"song "
I edited this example by adding a
rds.input_rds_text("#1")
after the first theget_text()
.What I may do is add comments in the examples to explain them.
Hello, I fixed:
the initial solution problem (thx to pointing out that typo)
moved the position of the specs
As for the other one, I don't really understand, as the random cases are made by implementing a solution that works with the fixed cases. I think it's probably a problem with me not explaining the algorithm correctly. I'm trying to wrap my head around a way to explain it simply (the difficulty of explaining is why I mainly used examples). I'll try to find ways to better explain the problem (already added a part, see if that helps).
Hi,
self
in arguments)get_text
is clearing the stringLoading more items...