问题
单项选择题
将含有100个节点的完全二叉树从根这一层开始,每层从左到右依次对节点编号,根节点的编号为1,编号为71的节点的双亲的编号为( )。
A.34
B.35
C.36
D.不确定
答案
参考答案:B
解析: 设双亲编号为i,则其左孩子节点编号为2i右孩子节点编号为2i+1。如果2i+1=71,则i=35。
将含有100个节点的完全二叉树从根这一层开始,每层从左到右依次对节点编号,根节点的编号为1,编号为71的节点的双亲的编号为( )。
A.34
B.35
C.36
D.不确定
参考答案:B
解析: 设双亲编号为i,则其左孩子节点编号为2i右孩子节点编号为2i+1。如果2i+1=71,则i=35。
A group of frogs were traveling through the forests, but unluckily two of them fell into a hole. The other frogs tried to help them. When they saw how 51 the hole was, they cried to the two frogs that they could not be saved. The two frogs didn’t 52 and tried their best to jump up out of the hole. The other frogs 53 saying that they were sure to die. 54, one of the two frogs, who heard what the other frogs were saying, 55 . Then he fell down and died. The other frog, however, 56 to jump as hard as he could, and at last made it out. When he 57 , the other frogs asked, "Didn’t you hear us?" The frog, who had a poor 58, explained, "I thought you were encouraging me all the timid." The story teaches us a 59 : There is power(力量) of life and death in the tongue. An 60 word to those who are down can help them out while a discouraging word can kill them.
|