Path In Zigzag Labelled Binary Tree
In an infinite binary tree where each node has two children, the nodes are labelled in a zigzag order. In the first level, the root is labelled 1, and the second level, the left child is labelled 3 and the right child is labelled 2. Then the labelling repeats in a zigzag manner as you go down the tree. Given a label, return the path from the root to that label in the tree.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)