What is the depth of [3,9,20,null,null,15,7]?

Practice this question from Maximum Depth of Binary Tree - Height recursion Pattern Practice Quiz, with options and an explanation.

Question

What is the depth of [3,9,20,null,null,15,7]?

Option A — Correct answer

3

Option B

2

Option C

4

Option D

7

Explanation

The maximum depth is 3.

Maximum Depth of Binary Tree - Height recursion Pattern Practice Quiz

All questions · Previous question · Next question

Open on QuizMaker