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

0% completed

Level Order Successor (easy)

Problem Statement

Given a binary tree and a node, find the level order successor of the given node in the tree. The level order successor is the node that appears right after the given node in the level order traversal.

Example 1:

Example 2:

Example 3:


  • The number of nodes in the tree is in the range [0, 10<sup>5</sup>].
  • -1000 <= Node.val <= 1000

Try it yourself

Try solving this question here:




Like the course? Get enrolled and start learning!