Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Problem Challenge 2: Right View of a Binary Tree (easy)

Problem Statement

Given a binary tree, return an array containing nodes in its right view. The right view of a binary tree is the set of nodes visible when the tree is seen from the right side.


  • The number of nodes in the tree is in the range [0, 100].
  • -100 <= Node.val <= 100

Try it yourself

Try solving this question here:




Like the course? Get enrolled and start learning!