题目详情

对下图所示的二叉树进行顺序存储(根结点编号为1,对于编号为i的结点,其左孩子结点为2i,右孩子结点为2i+1)并用一维数组BT来表示,已知结点X、E和D在数组BT中的下标分别为1、2、3, 可推出结点G、K和H在数组BT中的下标分别为(  )。

中级软件评测师,历年真题,2018年下半年(上午)《软件评测师》真题

  • A.10、11、12
  • B.12、24、25
  • C.11、12、13
  • D.11、22、23

正确答案及解析

正确答案
D
解析

元素G为F的右子树,其下标为2F+1;F为元素E的右子树,其下标为2E+1,E的下标为2,因此G=2*(2*2+1)+1=11;K=2G=22;H=2G+1=23;

包含此试题的试卷

你可能感兴趣的试题

单选题

Advancements in ( )have contributed to the growth of the automotive industry through the creation and evolution of self-driving vehicles.

  • A.Artificial Intelligence
  • B.Cloud Computing
  • C.Internet of Things
  • D.Big Data
查看答案
单选题

In project human resource management , ( )is not a source of power for the project manager.

  • A.referent power
  • B.expert power
  • C.reward power
  • D.audit power
查看答案
单选题

At the project establishment stage , the feasibility study mainly includes techinical feasibility analysis , ( ), operation environment feasibility analysis and other aspects of feasibility analysis.

  • A.detail feasibility analysis
  • B.opportunity analysis
  • C.economic feasibility analysis
  • D.risk analysis
查看答案
单选题

( )is a grid that shows the project resources assigned to each work package.

  • A.Stakeholder engagement assessment matrix
  • B.Requirements traceability matrix
  • C.Probability and impact matrix
  • D.Responsibility assignment matrix
查看答案
单选题

Xinhua News Agency reported in January 2022,Chian will further promote the developmet of a digital economy during the 14th Five-Year Plan eriod(2021-2025). The plan also emphasized industrial ( )transformation.

  • A.digital
  • B.networking
  • C.intelligentize
  • D.informatization
查看答案

相关题库更多 +