一起答
单选

● 一个具有m个结点的二叉树,其二叉链表结点 (左、右孩子指针分别用left和right表示)中的空指针总数必定为 (57) 个。为形成中序(先序、后序)线索二叉树,现对该二叉链表所有结点进行如下操作:若结点p的左孩子指针为空,则将该左指针改为指向p 在中序(先序、后序)遍历序列的前驱结点;若 p 的右孩子指针为空,则将该右指针改为指向p在中序(先序、后序)遍历序列的后继结点。假设指针s指向中序(先序、后序)线索二叉树中的某结点,则 (58) 。

(57)

  • A. m+2       
  • B. m+1     
  • C. m      
  • D. m-1    (58)
  • A. s->right指向的结点一定是s所指结点的直接后继结点
  • B. s->left指向的结点一定是s所指结点的直接前驱结点
  • C. 从s所指结点出发的right链可能构成环  
  • D. s所指结点的left和right指针一定指向不同的结点
参考答案
查看试卷详情
相关试题
  1.  ● 下面关于防火墙的说法,正确的是 (69) 。

    (69)

    • A. 防火墙一般由软件以及支持该软件运行的硬件系统构成
    • B. 防火墙只能防止未经授权的信息发送到内网
    • C. 防火墙能准确地检测出攻击来自哪一台计算机
    • D. 防火墙的主要支撑技术是加密技术
  2. ● Internet上的DNS服务器中保存有 (70) 。

    (70)

    • A. 主机名        
    • B. 域名到IP地址的映射表
    • C. 所有主机的MAC地址  
    • D. 路由表
  3. ● It should go without saying that the focus of UML is modeling. However, what that means, exactly, can be an open-ended question.  (71)  is a means to capture ideas, relationships, decisions, and requirements in a well-defined notation that can be applied to many different domains. Modeling not only means different things to different people, but also it can use different pieces of UMLdepending on what you are trying to convey. In general, a UML model is made up of one or more   (72) . A diagram graphically represents things, and the relationships between these things. These  (73) can be representations of real-world objects, pure software constructs, or a description of the behavior. of some other objects. It is common for an individual thing to show up on multiple diagrams; each diagram represents a particular interest, or view, of the thing being modeled. UML 2.0 divides diagrams into two categories: structural diagrams and behavioral diagrams.   (74) are used to capture the physical organization of the things in your system, i.e., how one object relates to another.  (75) focus on the behavior of elements in a system. For example, you can use behavioral diagrams to capture requirements, operations, and internal state changes for elements.

    (71)

    • A.Programming   
    • B. Analyzing   
    • C. Designing   
    • D. Modeling    (72)
    • A.views         
    • B. diagrams   
    • C. user views         
    • D. structure pictures    (73)
    • A. things           
    • B. pictures   
  4. ● 下面关于网络系统设计原则的论述,正确的是 (67) 。

     (67)

    • A. 应尽量采用先进的网络设备,获得最高的网络性能   
    • B. 网络总体设计过程中,只需要考虑近期目标即可,不需要考虑扩展性
    • C. 网络系统应采用开放的标准和技术 
    • D. 网络需求分析独立于应用系统的需求分析  
  5. ● 下面的选项中,属于本地回路地址的是 (68) 。

    (68)

    • A. 120.168.10.1       
    • B. 10.128.10.1   
    • C. 127.0.0.1        
    • D. 172.16.0.1
  6. ● ADSL是一种宽带接入技术,这种技术使用的传输介质是 (66) 。

    (66)

    • A. 电话线               
    • B. CATV 电缆  
    • C. 基带同轴电缆     
    • D. 无线通信网
  7. ● 设某算法的计算时间表示为递推关系式T(n)= T(n-1) + n (n>0) 及T(0)=1,则该算法的时间复杂度为 (65) 。

  8. ● 某一维数组中依次存放了数据元素 12,23,30,38,41,52,54,76,85,在用折半(二分)查找方法(向上取整)查找元素54时,所经历“比较”运算的数据元素依次为 (62) 。 

    (62)

    • A. 41, 52, 54   
    • B. 41, 76, 54   
    • C. 41, 76, 52, 54 
    • D. 41, 30, 76, 54
  9. ● 具有n个顶点、e条边的图采用邻接表存储结构,进行深度优先遍历和广度优先遍历运算的时间复杂度均为 (63) 。

  10. ● 给定一组长度为n的无序序列,将其存储在一维数组a[0..n-1]中。现采用如下方法找出其中的最大元素和最小元素:比较 a[0]和 a[n-1],若 a[0]较大,则将二者的值进行交换;再比较a[1]和a[n-2],若a[1]较大,则交换二者的值;然后依次比较a[2]和a[n-3]、a[3]和 a[n-4]、…,使得每一对元素中的较小者被交换到低下标端。重复上述方法,在数组的前 n/2 个元素中查找最小元素,在后 n/2 个元素查找最大元素,从而得到整个序列的最小元素和最大元素。上述方法采用的算法设计策略是 (64) 。

    (64)

    • A. 动态规划法   
    • B. 贪心法   
    • C. 分治法   
    • D. 回溯法