[FEATURE REQUEST] Add Boundary Traversal of Binary Tree Problem
What would you like to Propose?
Boundary traversal is a Binary tree traversal technique. It includes: left boundary (nodes on left excluding leaf nodes) leaves (consist of only the leaf nodes) right boundary (nodes on right excluding leaf nodes)
Input: Binary tree Output: Boundary traversal (visiting the boundary nodes of the tree in anticlockwise direction, starting from root node)
Approach: Dividing the problem into three parts: left boundary, bottom boundary and right boundary and performing the traversal using recursion.
Issue details
Problem statement: Given a Binary Tree, the objective is to perform boundary traversal.
Test Case: Input: Binary Tree: [1 2 7 3 -1 -1 8 -1 4 9 -1 5 6 10 11] Output: Boundary Traversal: [1, 2, 3, 4, 5, 6, 10, 11, 9, 8, 7] Explanation: Starting from the root, we traverse from: 1 The left side traversal includes the nodes: 2, 3, 4 The bottom traversal include the leaf nodes: 5, 6, 10, 11 The right side traversal includes the nodes: 9, 8, 7 We return the root and the boundary traversal is complete.
Additional Information
No response
kindly assign this issue to me
kindly assign this issue to me
kindly assign this issue to me
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution!
Please reopen this issue once you have made the required changes. If you need help, feel free to ask in our Discord server or ping one of the maintainers here. Thank you for your contribution!