数据结构与算法(周测2)

1.The inorder traversal sequence of an AVL tree must be in sorted (non-decreasing) order.

     T      F

根据二叉搜索树性质,中序遍历一定是有序的,而且是递增的。

2.Insert 1, 2, 3, 4, 5, and 6 one by one into an initially empty AVL tree. Then the preorder traversal sequence of the resulting tree must be {4, 2, 1, 3, 5, 6}.

     T      F

最终的AVL树:

3.For any node in an AVL tree, the height of the left subtree must be greater than that of the right subtree.

     T      F

4.For an AVL tree, the balance factors of all the non-leaf nodes are 0 iff the tree is a complete binary tree.

     T      F

只有完美二叉树满足这个定义。

猜你喜欢

转载自www.cnblogs.com/nonlinearthink/p/11770770.html