Given the root of a binary tree, determine whether it is complete — every level is fully filled except possibly the last, which is filled from left to right 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: All levels filled left to right.Input: [1,2,3,4,5,null,7]
Output: false
Explanation: A gap appears before later nodes.Input: [1]
Output: true
Explanation: Single node.0<=nodes<=10^4-1000<=value<=1000