Return the leftmost node at each depth of a binary tree.
Constraints
Example
```python
# Example 1
# Tree: 1 -> left: 2, right: 3
# 2 -> left: 4
# 3 -> right: 5
root = {"val": 1, "left": {"val": 2, "left": {"val": 4, "left": None, "right": None}, "right": None}, "right": {"val": 3, "left": None, "right": {"val": 5, "left": None, "right": None}}}
left_side_view(root)
# Expected: [1, 2, 4]
# Example 2
# Tree: root = None
left_side_view(None)
# Expected: []
```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints