【单选题】【消耗次数:1】
具有n个结点的完全二叉树的深度为
「log2n」+1
log2n+1
log2n
「log2n」
参考答案:
复制
纠错
相关题目
【单选题】 设某二叉树中度数为0的结点数为N0,度数为1的结点数为Nl,度数为2的结点数为N2,则下列等式成立的是()。
①  N0=N1+1
②  N0=Nl+N2
③  N0=N2+1
④  N0=2N1+l
【判断题】 若二叉树用二叉链表作存贮结构,则在n个结点的二叉树链表中只有n—1个非空指针域。
①  正确
②  错误
【单选题】 设一棵采用链式存储的二叉树,除叶结点外每个结点度数都为2,该树结点中共有2n个指针域为空。则该树有( )个叶结点。
①  A.2n
②  B.2n+1
③  C.2n+2
④  D.N
【单选题】 设有定义:intn1=0,n2,*p=&n2,*q=&n1;,以下赋值语句中与n2=n1;语句等价的是()
①  *p=*q;
②  p=q;
③  *p=n1
④  p=*q;
【单选题】 <img class="kfformula" src="20190808/1565256537299613.png" data-latex="\left ( {{log}_{3}2} \right )\cdot \left ( {{log}_{2}27} \right )="/>( )
①  2
②  1
③  3
④  4
【单选题】 一棵采用链式存储的二叉树中,共有n个指针域被有效使用(即指针域为非空)。该二叉树有( )个结点。
①  A.n+1
②  B.n
③  C.n-1
④  D.n-2
【判断题】 一棵哈夫曼树有n个叶子结点(终端结点),该树总共有2n-2个结点。
①  正确
②  错误
【单选题】 设:inta=1,b=2,c=3,d=4,m=2,n=2;执行(m=a>b)&&(n=c>d)后n的值为()。
①  1
②  2
③  3
④  4
【单选题】 设一棵哈夫曼树共有2n+1个结点,则该树有( )个非叶结点。
①  A.n
②  B.n+1
③  C.n-1
④  D.2n
【单选题】 一棵有n个结点的二叉树,按层次从上到下,同一层从左到右顺序存储在一维数组A[1..n]中,则二叉树中第i个结点(i从1开始用上述方法编号)的右孩子在数组A中的位置是()。
①  A[2i](2i=n)
②  A[2i+1](2i+1=n)
③  A[i-2]
④  条件不充分,无法确定
随机题目
【单选题】 -Id like to buy that coat. -Im sorry. ___.
①  it sold
②  its selling
③  Its been sold
④  it had been sold
【单选题】 English ____ in Canada.
①  speaks
②  are spoken
③  is speaking
④  is spoken
【单选题】 The key ___ on the table when I leave.
①  was left
②  will be left
③  is left
④  has been left
【单选题】 阅读理解:阅读下列短文,回答文后问题,选择最佳答案Trees mainly serve man in three important ways: They provide him with wood and other products; they provide him shade; and they help to prevent droughts and floods.Unfortunately, in many parts of the world, man has not realized that the third of these services is the most important.In his eagerness to make money from trees, he has cut them down in large numbers, only to find that without them he has lost the best friends he had. And besides, he is usually too careless to plant and look after new trees. So the forests slowly disappear.This does not only mean that man will have fewer trees. The results are even more serious: for where there are trees, their roots break up soil allowing the rain to sink in and also bind(固定) the soil, thus preventing it from being washed away easily;but where there are no trees, the rain falls on hard ground and flows away, causing floods and carrying away the rich top-soil. When the top-soil is gone, nothing remains but worthless desert.Two thousand years ago,a rich and powerful country cut down its trees to build warships, with which to gain itself an empire.It set up the empire, but, without its trees, its soil became poor and grew weak. When the empire fell to pieces, the home country found itself faced by floods and starvation(饥荒).5. Which title best fits the passage?
①  A. Trees and Man
②  B. The Function of Tree Wood
③  C. How do People do with Trees?
④  D. The Usage of Tree Roots
【单选题】 Doctors ___ in every part of the world.
①  need
②  are needing
③  are needed
④  will need
【单选题】 The Peoples Republic of China ___ on October 1, 1949.
①  found
②  was founded
③  is founded
④  was found
【单选题】 A new house ___ at the corner of the road.
①  is building
②  is being built
③  been built
④  be building
【单选题】 Our room must ___ clean.
①  keep
②  be kept
③  to be kept
④  to keep
【单选题】 阅读理解:阅读下列短文,回答文后问题,选择最佳答案Trees mainly serve man in three important ways: They provide him with wood and other products; they provide him shade; and they help to prevent droughts and floods.Unfortunately, in many parts of the world, man has not realized that the third of these services is the most important.In his eagerness to make money from trees, he has cut them down in large numbers, only to find that without them he has lost the best friends he had. And besides, he is usually too careless to plant and look after new trees. So the forests slowly disappear.This does not only mean that man will have fewer trees. The results are even more serious: for where there are trees, their roots break up soil allowing the rain to sink in and also bind(固定) the soil, thus preventing it from being washed away easily;but where there are no trees, the rain falls on hard ground and flows away, causing floods and carrying away the rich top-soil. When the top-soil is gone, nothing remains but worthless desert.Two thousand years ago,a rich and powerful country cut down its trees to build warships, with which to gain itself an empire.It set up the empire, but, without its trees, its soil became poor and grew weak. When the empire fell to pieces, the home country found itself faced by floods and starvation(饥荒).4. Why did the country mentioned in the passage suffer from floods and starvations?
①  A. Because it set up an empire.
②  B. Because it fell to pieces.
③  C. Because it turned its trees into warships.
④  D. Because it spent too much money on wars.
【单选题】 阅读理解:阅读下列短文,回答文后问题,选择最佳答案Trees mainly serve man in three important ways: They provide him with wood and other products; they provide him shade; and they help to prevent droughts and floods.Unfortunately, in many parts of the world, man has not realized that the third of these services is the most important.In his eagerness to make money from trees, he has cut them down in large numbers, only to find that without them he has lost the best friends he had. And besides, he is usually too careless to plant and look after new trees. So the forests slowly disappear.This does not only mean that man will have fewer trees. The results are even more serious: for where there are trees, their roots break up soil allowing the rain to sink in and also bind(固定) the soil, thus preventing it from being washed away easily;but where there are no trees, the rain falls on hard ground and flows away, causing floods and carrying away the rich top-soil. When the top-soil is gone, nothing remains but worthless desert.Two thousand years ago,a rich and powerful country cut down its trees to build warships, with which to gain itself an empire.It set up the empire, but, without its trees, its soil became poor and grew weak. When the empire fell to pieces, the home country found itself faced by floods and starvation(饥荒).3. Land becomes desert after all trees are cut down because __________.
①  A. roots of trees break up the soil
②  B. no tree keeps the rain and protects the top-soil
③  C. strong winds bring a lot of sand
④  D. there are too many rainfalls to make it