What depth should a null node return?
Practice this question from Maximum Depth of Binary Tree - Height recursion Pattern Practice Quiz, with options and an explanation.
Question
What depth should a null node return?
Option A — Correct answer
0
Option B
1
Option C
-1
Option D
infinity
Explanation
A null node contributes depth 0.