⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chapter2.htm

📁 介绍各种数据结构的讲义
💻 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 = "chapter1.htm";
var next = "chapter3.htm";
</script>
<!-- #EndEditable -->
</head>
<body bgcolor="#FFFFFF">
<div id="content"> 
<!-- #BeginEditable "MainContent" --> 
<h2>ADT栈的操作</h2>
<p>作为一种抽象数据类型,常用的栈运算有:</p>
<div align="center"> 
  <center>
    <table border="1" width="90%" bordercolor="#FFFFFF" cellpadding="5" style="font-size: 10pt">
      <tr> 
        <td width="27%" bgcolor="#E0E0E0" align="center"><b>运算</b></td>
        <td width="73%" bgcolor="#E0E0E0" align="center"><b>含义</b></td>
      </tr>
      <tr> 
        <td width="27%" bgcolor="#E0E0E0" align="center">MakeNull(S)</td>
        <td width="73%" bgcolor="#E0E0E0">使S成为一个空栈。</td>
      </tr>
      <tr> 
        <td width="27%" bgcolor="#E0E0E0" align="center">Top(S)</td>
        
      <td width="73%" bgcolor="#E0E0E0">这是一个函数,函数值为S中的栈顶元素。用<a href="../list/chapter2.htm">表运算</a>可将Top(S)表示为Retrieve(First(S),S)。</td>
      </tr>
      <tr> 
        <td width="27%" bgcolor="#E0E0E0" align="center">Pop(S)</td>
        
      <td width="73%" bgcolor="#E0E0E0">从栈S中删除栈顶元素,简称为抛栈。这个运算等价于<a href="../list/chapter2.htm">表运算</a>的Delete 
      (First(S),S)运算。</td>
      </tr>
      <tr> 
        <td width="27%" bgcolor="#E0E0E0" align="center">Push(x,S)</td>
        
      <td width="73%" bgcolor="#E0E0E0">在S的栈顶插入元素x,简称为将元素x入栈。用<a href="../list/chapter2.htm">表运算</a>可将 
      Push(x,S)表示为Insert(x,FIRST(S),S)。</td>
      </tr>
      <tr> 
        <td width="27%" bgcolor="#E0E0E0" align="center">Empty(S)</td>
        <td width="73%" bgcolor="#E0E0E0">这是一个函数。当S为空栈时,函数值为true,否则函数值为false。</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 + -