说明complete tree的最低level出现了。 自此以后,queue再不该有node再有child, queue后面出现的node的左右孩子应该都是null. Check a binary tree is completed or not. A complete binary tree is not binary tree that every level is ...
2. Only calculate depth using maxDepth function. Same concept as in 1, but cost more traversal efforts. Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results