📄 chapter4.htm
字号:
<html><!-- #BeginTemplate "/Templates/article_template.dwt" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="algorithm, data structure, contest, programming, 算法, 数据结构, 程序设计, 竞赛">
<meta name="description" content="discussing the algorithm and data structure of computer programming, as well as all kinds of programming contest.">
<meta name="description" content="讨论程序设计的算法与数据结构,各类程序设计竞赛试题解析和参赛经验介绍。">
<!-- #BeginEditable "doctitle" -->
<title>ADT二叉树的操作</title>
<!-- #EndEditable -->
<script id="header" language="JavaScript" src="../../../lib/header.js"></script>
<!-- #BeginEditable "javascript" -->
<script language="JavaScript">
var previous = "chapter3.htm";
var next = "chapter5.htm";
</script>
<!-- #EndEditable -->
</head>
<body bgcolor="#FFFFFF">
<div id="content">
<!-- #BeginEditable "MainContent" -->
<h2>ADT二叉树的操作</h2>
<p>二叉树的常用操作与<a href="../tree/chapter4.htm">树的常用操作</a>相似。</p>
<div align="center">
<center>
<table border="0" width="90%" cellpadding="5">
<tr>
<td width="42%" style="font-size: 10pt" bgcolor="#E0E0E0" align="center"><b>运算</b></td>
<td width="58%" style="font-size: 10pt" bgcolor="#E0E0E0" align="center"><b>含义</b></td>
</tr>
<tr>
<td width="42%" style="font-size: 10pt" bgcolor="#E0E0E0">Parent(v,T)</td>
<td width="58%" style="font-size: 10pt" bgcolor="#E0E0E0">这是一个求父结点的函数,函数值为树T中结点v的父亲。当v是根结点时,函数值为∧,表示结点v没有父结点。</td>
</tr>
<tr>
<td width="42%" style="font-size: 10pt" bgcolor="#E0E0E0">Left_Child(v,T)</td>
<td width="58%" style="font-size: 10pt" bgcolor="#E0E0E0">这是一个求左儿子结点的函数。函数值为树T中结点v的左儿子。当结点v没有左儿子时,函数值为∧。</td>
</tr>
<tr>
<td width="42%" style="font-size: 10pt" bgcolor="#E0E0E0">Right_Child(v,T)</td>
<td width="58%" style="font-size: 10pt" bgcolor="#E0E0E0">这是一个求右儿子结点的函数。函数值为树T中结点v的右儿子。当结点v没有右儿子时,函数值为∧。</td>
</tr>
<tr>
<td width="42%" style="font-size: 10pt" bgcolor="#E0E0E0">Create(x,Left,Right,T)</td>
<td width="58%" style="font-size: 10pt" bgcolor="#E0E0E0">这是一个建树过程。该函数生成一棵新的二叉树T,T的根结点v的标号为x,v的左右儿子分别为Left和Right。</td>
</tr>
<tr>
<td width="42%" style="font-size: 10pt" bgcolor="#E0E0E0">Label(v,T)</td>
<td width="58%" style="font-size: 10pt" bgcolor="#E0E0E0">这时一个求标号的函数,函数值就是结点v的标号。</td>
</tr>
<tr>
<td width="42%" style="font-size: 10pt" bgcolor="#E0E0E0">Root(T)</td>
<td width="58%" style="font-size: 10pt" bgcolor="#E0E0E0">这是一个求树根的函数,函数值为树T的根结点。当T是空树时,函数值为∧。</td>
</tr>
<tr>
<td width="42%" style="font-size: 10pt" bgcolor="#E0E0E0">MakeNull(T)</td>
<td width="58%" style="font-size: 10pt" bgcolor="#E0E0E0">这是一个过程,它使T成为一棵空树。</td>
</tr>
</table>
</center>
</div>
<!-- #EndEditable -->
</div>
<script src='../../../lib/footer.js'>
</script>
</body>
<!-- #EndTemplate --></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -