This question evaluates understanding of binary tree properties and traversal techniques, testing competency in data structures and algorithmic reasoning related to tree completeness.
You are given the root of a binary tree. Determine whether the tree is a complete binary tree.
A binary tree is complete if:
root
: root node of a binary tree (or
null
).
true
if the tree is complete; otherwise return
false
.
0..10^5