mediumNeetCode 150
Binary Tree Right Side View
Return the right side view of the tree as a list Example: [1,2,3,null,5,null,4] => [1,3,4]
Binary Tree Right Side View is a traversal problem: the hard part is modeling the state you visit. Interviewers love it because it reveals your traversal modeling and your edge-case discipline. Once your traversal structure is solid, you can reuse it across dozens of problems.
BFS / DFSTrees

Meet Coco
Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.
1Binary Tree Right Side Viewmedium