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.
No, the input is a list. AVL trees seem a little too complicated. The solution is simpler than that. You could build a tree from the list, but it is not necessarily needed.
I built an AVL tree and if I insert [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
it puts 4 at the top, so I'm wondering, in this kata, do we first BUILD a tree and then traverse it? You dont give the user a tree right?
This solution is animal. Can anyone read this?
I also cant figure it out.
Did you figure out how they get 24 and 18 from those pictures?
Dude, thanks for going so far as to make an edit. When I first looked at the code I thought it seemed weird. So it was Python.
The
Node
class is only available in the trainer, where it is preloaded. If you want to try it outside the trainer, either in the browser or in your code editor, here it is:Edit : JS version of the Node class, not the Python one.
Where is the definition for new Node()
Running in Node.js 19 'Node is not defined'
Running in browser 'Illegal constructor'