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.
.
I made a quick fix that will behave gracefully, except when the user actually returns None. Do you think it's acceptable?
oh, forget that... (was missing your last line... Back to it...)
[Python]
Tests should fail without raising exceptions if the result is not valid.
I initially forgot the return statement and got
AttributeError: 'NoneType' object has no attribute 'equal'
Python Translation
About the purity question: can't you just use different deep copies of the object? It was the cause of my failure and it is absent from the original language. Should I raise an issue about that? It's the point of tree rotations to change the tree in place.
The problem is the log shows no difference between actual and expected.
For me an array or such is not a proper way to encode a tree, but I'm just ignorant.
I don't understand the problem. The encoding is specified, appropriate, and a binary tree. Whether the specific class is
Object
or something custom does not really matter.The purity requirement is mostly because modifying your arguments makes test failure messages weird, and deep-freezing inputs is not a real solution either ( as well as bug-prone ). But this was not raised as the issue anyway - if you want that changed, please raise that as a separate issue. ( I'm willing to discuss the merits, but I will not be doing it. I just don't think it's a good idea. )
Is the problem here the
[Object]
s? Or should I be reading something else into it?It would be pointless if the kata was not rotate a binary tree.
JS:
The only real difference between JS and Java versions is the added purity requirement which genuinely shouldn't be there. Objects lacking a pointless
Node
wrapper is definitely not an issue, though.Please consider the issue I've raised above. I think it's still the time to rectificate.
Javascript should use a node/tree class like the other (and original) languages. Currently it just doesn't respect the kata specifications.
This comment is hidden because it contains spoiler information about the solution
Loading more items...