-
-
Notifications
You must be signed in to change notification settings - Fork 47.1k
Closed
Labels
enhancementThis PR modified some existing filesThis PR modified some existing files
Description
Feature description
Problem:
Given root of binary Tree, print the
binary-tree-right-side-view
binary-tree-left-side-view
binary-tree-top-side-view
binary-tree-bottom-side-view
1. binary-tree-right-side-view
3 <- 3
/ \
9 20 <- 20
/ \
15 7 <- 7
Output: [3, 20, 7]
2. binary-tree-left-side-view
3 -> 3
/ \
9 -> 9 20
/ \
15 -> 15 7
Output: [3, 9, 15]
3. binary-tree-top-side-view
9 3 20 7
⬇ ⬇ ⬇ ⬇
3
/ \
9 20
/ \
15 7
Output: [9, 3, 20, 7]
4. binary-tree-bottom-side-view
3
/ \
9 20
/ \
15 7
↑ ↑ ↑ ↑
9 15 20 7
Output: [9, 15, 20, 7]
Would you like to work on this feature?
- Yes, I want to work on this feature!
Metadata
Metadata
Assignees
Labels
enhancementThis PR modified some existing filesThis PR modified some existing files