Boundary Of Binary Tree Problem

Boundary Of Binary Tree Problem — ExecCode Medium DSA Practice

Solve the Boundary Of Binary Tree problem on ExecCode. Free online medium DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Practice companion for CodeFlow boundary-of-binary-tree.

Examples

Input {"root": [8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15]}; Output [8,4,2,1,3,5,7,9,11,13,15,14,12]. Input {"root": [1, null, 2, 3, 4]}; Output [1,3,4,2]. Input {"root": [1, 2, 3, 4, 5, 6, null, null, null, 7, 8, 9, 10]}; Output [1,2,4,7,8,9,10,6,3]

Constraints

1 ≤ n ≤ 10^5

Practice Boundary Of Binary Tree free on ExecCode. Browse DSA problems, topic map, and placement guides.