Concept Flow - Left Side View of Binary Tree
Start at root node
Initialize queue with root
While queue not empty
Get number of nodes at current level
For each node in level
Pop node from queue
If first node in level, add to left view
Add left child to queue if exists
Add right child to queue if exists
Repeat for all nodes in level
Repeat for next level
Return collected left view nodes
We visit the tree level by level from top to bottom, and at each level, we record the first node we see (the leftmost node). We use a queue to keep track of nodes to visit.
