【单选题】【消耗次数:1】
一棵有n个结点的二叉树,按层次从上到下,同一层从左到右顺序存储在一维数组A[1..n]中,则二叉树中第i个结点(i从1开始用上述方法编号)的右孩子在数组A中的位置是()。
A[2i](2i=n)
A[2i+1](2i+1=n)
A[i-2]
条件不充分,无法确定
参考答案:
复制
纠错
相关题目
【单选题】 用顺序存储的方法将完全二叉树中的所有结点逐层存放在数组中R[1..n],结点R[i]若有左孩子,其左孩子的编号为结点( )。
①  R[2i+1]
②  R[2i]
③  R[i/2]
④  R[2i-1]
【单选题】 用顺序存储的方法将完全二叉树中所有结点逐层存放在数组a[1]~a[n]中,结点a[i]若有左孩子,其左孩子的编号为结点( )。
①  a[2i+1]
②  a[2i-1]
③  a[i/2]
④  a[2i]
【单选题】 在一棵二叉树中,若编号为i的结点是其双亲结点的右孩子,则双亲结点的顺序编号为( )。
①  A.i/2.0
②  B.i/2+1
③  C.2i+1
④  D.i/2向下取整
【单选题】 在一棵二叉树中,若编号为i的结点存在双亲结点,则双亲结点的顺序编号为( )。
①  A.i/2.0
②  B.i/2向下取整
③  C.2i+1
④  D.i+2
【单选题】 设一棵采用链式存储的二叉树,除叶结点外每个结点度数都为2,该树结点中共有2n个指针域为空。则该树有( )个叶结点。
①  A.2n
②  B.2n+1
③  C.2n+2
④  D.N
【单选题】 一棵采用链式存储的二叉树中,共有n个指针域被有效使用(即指针域为非空)。该二叉树有( )个结点。
①  A.n+1
②  B.n
③  C.n-1
④  D.n-2
【判断题】 若二叉树用二叉链表作存贮结构,则在n个结点的二叉树链表中只有n—1个非空指针域。
①  正确
②  错误
【单选题】 一棵二叉树高度为h,所有结点的度或为0,或为2,则这棵二叉树最少有( )结点。
①  2h
②  2h-1
③  2h+1
④  h+1
【判断题】 一棵有18个结点的二叉树,其2度结点数的个数为8,则该树共有1个1度结点
①  正确
②  错误
【单选题】 具有n个结点的完全二叉树的深度为
①  「log2n」+1
②  log2n+1
③  log2n
④  「log2n」
随机题目
【单选题】 Body language contains a lot of information. So, ______ your body language
①  be likely to
②  be aware of
③  be friendly with
④  be patient with
【单选题】 A balanced diet is ______ as a quick and effective way to keep in good health.
①  consider
②  considers
③  considered
④  considering
【单选题】 We should not eat or eat less______ food.
①  junk
②  garbage
③  trash
④  rubbish
【单选题】 My brother can take his car apart and put it back together again. I certainly wish he______ me how.
①  would teach
②  has taught
③  will teach
④  teaches
【单选题】 She’s very ______ and would like to see each thing in its place.
①  gathered
②  grouped
③  modernized
④  organized
【单选题】 Keeping eye contact ______ respect for the interviewer and your audience.
①  says
②  pays
③  throws
④  shows
【单选题】 Do plan to arrive ______or a few minutes early for a job interview.
①  no time
②  on time
③  all the time
④  at a time
【单选题】 But for the immediate help from his neibour, the old man______of hunger fifteen years ago.
①  must die
②  must have died
③  would die
④  would have died
【单选题】 Can I send a package with some fragile______?
①  items
②  itinerary
③  terms
④  teams
【单选题】 Sorry, we cannot further______ the price.
①  deepen
②  shorten
③  lower
④  simpler