题目详情

若某二叉树的先序遍历序列是ABDCE,中序遍历序列是BDACE,则该二叉树为(  )。

  • A.<img src='http://tp.mxqe.com/data/718/17975802_0.png' alt='中级软件评测师,历年真题,2019年下半年(上午)《软件评测师》真题' title='中级软件评测师,历年真题,2019年下半年(上午)《软件评测师》真题'>
  • B.<img src='http://tp.mxqe.com/data/718/17975802_0_1.png' alt='中级软件评测师,历年真题,2019年下半年(上午)《软件评测师》真题' title='中级软件评测师,历年真题,2019年下半年(上午)《软件评测师》真题'>
  • C.<img src='http://tp.mxqe.com/data/718/17975802_0_2.png' alt='中级软件评测师,历年真题,2019年下半年(上午)《软件评测师》真题' title='中级软件评测师,历年真题,2019年下半年(上午)《软件评测师》真题'>
  • D.<img src='http://tp.mxqe.com/data/718/17975802_0_3.png' alt='中级软件评测师,历年真题,2019年下半年(上午)《软件评测师》真题' title='中级软件评测师,历年真题,2019年下半年(上午)《软件评测师》真题'>

正确答案及解析

正确答案
D
解析

先序遍历:先遍历根节点,然后以先序遍历的方式遍历左子树,最后以先序遍历的方式遍历右子树。

中序遍历:先以中序遍历的方式遍历左子树,然后遍历根节点,最后以中序遍历的方式遍历右子树。

选项A:先序遍历的结果为:ABDEC;中序遍历的结果为:DBEAC

选项B:先序遍历的结果为:ABCDE;中序遍历的结果为:BADCE

选项C:先序遍历的结果为:ABDCE;中序遍历的结果为:BDAEC

选项D:先序遍历的结果为:ABDCE;中序遍历的结果为:BDACE

包含此试题的试卷

你可能感兴趣的试题

单选题

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
查看答案

相关题库更多 +