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.
still not working, the same problem with the last test
That last test caught me offguard. Maybe the description could've mentioned possible edge cases.
updated last test to only do 50
can you verify if that helps fix the issue?
also there was a note in the description saying the last test was flaky
moved the last test to do only 50 times can you verify?
resubmitting 5 times, did not work...
last test fails, even tho it works locally when i copy paste inputs for the last test (the one with 300 nesting)
3h wasted damn...
please fix...
ranks cannot be changed
This comment is hidden because it contains spoiler information about the solution
in this kata we mutate object, so if we will replace primitives with object/array, we will lost their data.
for example,
And in fact we should not assign props to primitives, and it looks like
deepAssignment
should throw an exeption, that this path is invalid or something like that.Thanks for pointing this out.
I can add a test to clarify that the string type should be converted, based on getter access? Or rather, what do you think would make more sense, and make the kata more useful?
My solution - if a primitive value found in chain - replace it with object/array
Yes, I just looked at the last test case and that's pretty much it.
I think we need some author clarification :)
I've got a problem with final case.
Input object is something like
{ ..., ddd: [ 'ddd[0]', ... ], ...}
Input path is kinda
ddd[0].asdfe.ddd[2]...
When we resolve path like this, we go to the array
ddd
, take the first element (which isddd[0]
) and then we need to assignasdfe
to the stringddd[0]
, but it would not work for primitive values like String.So test fails because we can't read
.ddd
inasdfe
, because it's undefined in string.It can be assumed, that this test means that we need to go up and use the parent Array for values like this, but it's not clear and there is nothing about in description.
We need to fix the last test or update the description with better clarification, because this behavior is implicit
cool and awesome.
That'd be great. I put in an honest attempt at figuring out why the last test was sketchy.
I'd be interested in finding out what it is.
cheers.
Approved
(As for the final test case, I'll look at it later. If you have problems with it, just try resubmitting a few times.)
Loading more items...