题目连接 解题思路: 从左往右层序遍历一个二叉树,在某一层的节点队列中,如果某个pop出的节点为空,并且队列中仍然有非空的元素,说明这个二叉树不是完全二叉树。 C++: /** * Definition for a binary tree node. * struct TreeNode { * in Read More
posted @ 2021-04-05 00:50 洗盏更酌 Views(47) Comments(0) Diggs(0) Edit