博客
关于我
数据结构复习笔记——树的基本概念及结构
阅读量:374 次
发布时间:2019-03-04

本文共 289 字,大约阅读时间需要 1 分钟。

某二叉树共有399个结点,其中有199个度为2的结点。我们需要计算该二叉树中的叶子结点数。

首先,计算剩余结点数:399 - 199 = 200个结点是度为0或1的节点。设叶子结点数为L,则度为1的节点数为200 - L。

根据二叉树的度数公式,叶子结点数L满足:[ L = 1 + (\text{度为2的节点数}) - (\text{度为1的节点数}) ]代入已知数据:[ L = 1 + 199 - (200 - L) ][ L = 200 - (200 - L) ][ L = L ]

解得L = 200。

因此,该二叉树的叶子结点数为200,选项为B。

答案:B 200

转载地址:http://rudg.baihongyu.com/

你可能感兴趣的文章
ping 命令的七种用法,看完瞬间成大神
查看>>
Pinia:$patch的使用场景
查看>>
Pinia:$subscribe()的使用场景
查看>>
Pinpoint对Kubernetes关键业务模块进行全链路监控
查看>>
Pinterest 大规模缓存集群的架构剖析
查看>>
pintos project (2) Project 1 Thread -Mission 1 Code
查看>>
PinYin4j库的使用
查看>>
PIP
查看>>
pip install goose-extractor // SyntaxError: Missing parentheses in call to 'print'
查看>>
pip install 出现报asciii码错误的解决
查看>>
pip throws TypeError: parse() got an unexpected keyword argument ‘transport_encoding‘ 在尝试安装新软件包时
查看>>
pip 下载慢
查看>>
pip 升级报错AttributeError: ‘NoneType’ object has no attribute ‘bytes’
查看>>
pip 安装opencv-python卡死
查看>>
pip 安装出现异常
查看>>
Pip 安装失败:需要 SSL
查看>>
Pip 安装挂起
查看>>
pip 或 pip3 为 Python 3 安装包?
查看>>
pip/pip3更换国内源
查看>>
pip3 install PyQt5 --user 失败
查看>>