Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Path In Zigzag Labelled Binary Tree
Please consume this content on for a richer experience. It is necessary to solve the questions while watching videos, enables that.
NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this question we print numbers in Increasing Order and Decreasing Order.
Question Name:
Path In Zigzag Labelled Binary Tree
Question Link:
Question Statement:
In an infinite binary tree where every node has two children, the nodes are labelled in row order.
In the odd numbered rows (ie., the first, third, fifth,...), the labelling is left to right, while in the even numbered rows (second, fourth, sixth,...), the labelling is right to left.
Given the label of a node in this tree, return the labels in the path from the root of the tree to the node with that label.
Topic: #Path In Zigzag Labelled Binary Tree #trees #binary Tree
#TimeComplexity: O(log n)
#SpaceComplexity: O(1)
More Youtube PlayList:
Level 1 In Java English :
Level 1 In Java Hindi :
Level 2 In Java Hindi :
Constructive Algorithm - Level 3 :
Geometry - Level 3 :
Maths for CP - Level 3 :
DP - Level 3 :
Euler Tour - Level 3 :
Ternary Search :
Recursion & Backtracking - Level 1 :
Recursion & Backtracking - Level 2 :
Graphs - Level 1 :
Dyanmic Programming - Level 1 :
Generic Trees - Level 1 :
Time and Space - Level 1 :
Pepcoding has taken the initiative to provide counselling and learning resources to all curious, skillful and dedicated Indian coders. This video is part of the series to impart industry-level web development and programming skills in the community.
We also provide professional courses with live classes and placement opportunities.
For more free study resources and information about the courses, visit:
Have a look at our result:
Follow us on our Youtube page:
Follow us on our FB page:
Follow us on Instagram:
Follow us on LinkedIn:
Follow us on Pinterest:
Follow us on Twitter:
Happy Programming !!! Pep it up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment