ByteByteGo logo
menuProblems List

Rightmost Nodes of a Binary Tree

Medium

Return an array containing the values of the rightmost nodes at each level of a binary tree.

Example:

Output: [1, 3, 6, 11]

You can practice coding exercises online by logging into bytebytego.com on your laptop.