Given the root of a binary tree, determine whether it is complete: every level except possibly the last is fully filled, and the last level's nodes are as far left as possible with no gaps. Return true or false. The tree is given as a level-order array with null for missing children.
Input: A level-order array of the tree.
Output: Boolean — true or false.
Input: [1,2,3,4,5,6]
Output: true
Explanation: Filled left to right with no gaps.Input: [1,2,3,4,5,null,7]
Output: false
Explanation: A gap appears before node 7.Input: [1]
Output: true
Explanation: Single node.1<=nodes<=1001<=value<=1000