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.
corrected
Could you elaborate why?
EDIT: Oh you mean from numbers to plain english? I thought you mean kata language translation.
(deleted)
Composable streaming folds
This is elementary logic. If you were never taught that, I can see how it looks arbitrary.
But it really isn't.
(JS, possibly others)
Description could be improved:
null
if the array is empty"n-1
array ofBoolean
s. it's more of a rolling result; each prefix result implies the next value, recursively.The empty array case is completely arbitrary ( returning
True
would actually make more sense ); also,[False]
by itself should also really returnTrue
IMO. Why are lengths < 2 even tested? Just don't.Maximising array length at 8 is also arbitrary. You're not going to hardcode this, are you? ( Actually, the tests are hardcoded. I would definitely have done that algorithmically! O.O ) But there will always be some limit, and 8 is as good as any.
Looking at the test cases in addition to the problem description was no help for me. Both looked arbitrary as far as I could tell. I clicked through to the solution after googling and guessing for long enough. Disappointing.
It says "return false for empty array" in description. Please correct, for the tests require to return null for empty array.
It is obviously very wrong. And so are the tests which should be modified. Thanks for pointing it out!
This solution looks wrong (or I misunderstood the assignment). It returns true for
isMerge "hello world" "elloh " "world"
whereas it should return false, since the ordering of characters in part1 is not the same as in s.
This comment is hidden because it contains spoiler information about the solution
@GiacomoSorbi Make sure to check this question for outdated parts.
I expected to find you here, senpai :D
Thanks for the link, didn't know about the online version of RWH with comments: bookmarked!
It does not check all cases. isMerge "charles" "cals" "her" should be False. Which is not for at least two programs in solutions sections among which is mine, which I submitted thinking it would not be taken.