MediumTrees
Binary Tree Right Side View
Get rightmost nodes at each level
Solution Approach
BFS or DFS
Complexity Analysis
Time Complexity
O(n)Space Complexity
O(h)Complexity
Time:O(n)
Space:O(h)
Asked at
GoogleAmazon
Get rightmost nodes at each level
BFS or DFS
Time Complexity
O(n)Space Complexity
O(h)