一、判断题
1、The result of inserting keys 1 to for any
in order into an initially empty skew heap is always a full binary tree.
T F
解析:T。我们可以采用数学归纳的思路处理这个问题:假设这个条件对于k = r成立,则对 k = r+1时,由于右路径上有r个节点,则右子树有个节点。而按照左倾堆的定义,左子树NPL(NULL Path length)也至少也为r。由此我们可以得到左子树的右路径长度至少为r,则左子树至少会有
个节点。
2、The right path of a skew heap can be arbitrarily long.
T F
解析:T。斜堆对于右路径的限制在于其长度需要小于左路径,而并没有具体数值的限制,所以自然可以做到无限长。(如我以加一个左儿子后给这个左儿子加一个右儿子,再给这个右儿子加一个左儿子,如此左右左右往复,可以构成一个右路径任意大小的斜堆)
二、单选题
1、Merge the two leftist heaps in the following figure. Which one of the following statements is FALSE?
A.2 is the root with 11 being its right child
B.the depths o