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.
Sorry, I didn't know that the discussion is lanugage agnostic.
I see. I apologize.
This comment is hidden because it contains spoiler information about the solution
Are you on macOS? I suspect that this is a distribution problem. I think macOS has a differentecho
then GNU/Linux.echo
is a built-in command, so it's the fault of the built-in bash being too old. This should work with newer bash.Thank you for this solution! Btw, do you mind sharing what code formatter you use? This vertical alignment looks really neat.
Approved, thank you all for the effort!
I see, sorry for the misunderstanding :p
Though isn't that too big too? Or is that to ensure that there's enough cases to distinguish a good solution from a bad one? You only used up to 300 as list length in python.
This comment is hidden because it contains spoiler information about the solution
Hello! Thank you for the translation!
Just one tiny thing, could you change the range
(0,100_000)
to(-100_000, 100_000)
? This would be more coherent to the Python translation, which is the first imperitive translation.Awesome, thank you! I have approved your fork.
Thanks for your translation :)
Could you complete the basic tests so that it's coherient with the description and other languages?
Also, do you think performance tests are needed? I decided to remove them in the end because there are some fun solutions that would time out.
I updated the draft with my new test cases :)
I have the same problem.
With the condition that "" is a valid tree, I decide to make it a minimal tree (so that this definition would work recursively.)
This has a problem, because that means the tree
are both represented by:
If I choose "" to represent Leaf, information are lost: I can no longer tell whether a subtree is on the left or on the right if there's only one subtree.
What could be a better way to model trees?
Thank you.
I changed the random test so that it has a chance to use larger lists.
What do you think?
I do not know a "bad" algorithm which will time out, but my solution doesn't time out and I think these are relatively big lists (in length and in numbers contained).
Otherwise I think it's all good!
Update: I removed the perf tests, I wanted to keep this kata basic and fun :p
I can't seem to see the images in the description...
True! I'll think about how to do that practically. And thanks :)
Loading more items...