📄 ds3习题.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>数 据 结 构</title>
<meta name="Microsoft Theme" content="hounk 010">
</head>
<body background bgcolor="#000099" text="#CCCC99" link="#FF9900" vlink="#996600" alink="#FF3300">
<!--mstheme--><font face="宋体">
<p:colorscheme
colors="#0000FF,#FFFFFF,#000000,#FFCC66,#00FFFF,#3366FF,#FF0033,#FFFF00"/>
<p align="center"><b><font face="oúì?,SimHei" lang="ZH-CN" color="#FFFFFF" size="6">第三章习题</font></b></p>
<p class="MsoNormal" style="margin-left:21.0pt;text-indent:-21.0pt;mso-list:l2 level1 lfo4;
tab-stops:list 21.0pt"><font color="#FFFFFF"><b><span lang="EN-US" style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman""><font size="5">一、<span style="font-style: normal; font-variant: normal; font-family: Times New Roman">
</span></font></span><font size="5" color="#FFFFFF"><span style="font-family:宋体;mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman"">基本题</span></font></b><span lang="EN-US"><font size="5"><b> <o:p>
</o:p>
</b></font></span></font></p>
<p class="MsoNormal"><font color="#FFFFFF"><span lang="EN-US"><b><font size="5"> 1</font></b></span><b><font size="5"><span style="font-family:宋体;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"">.填空:线性表、栈和队列都是</span><span lang="EN-US">_____</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman"">结构,可以在线性表的</span><span lang="EN-US">_____</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">位置插入和删除元素,对于栈只能在</span><span lang="EN-US">_______</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">位置插入和删除元素,对于队只能在</span><span lang="EN-US">______</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">位置插入和</span><span lang="EN-US">______</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">位置删除元素。</span></font></b></font></p>
<p class="MsoNormal"><span lang="EN-US"><b><font color="#FFFFFF"><font size="5">2.
</font></font></b></span><font color="#FFFFFF"><b><font size="5"><span style="font-family:宋体;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"">栈和队列数据结构的特点,什么情况下用到栈,什么情况下用到队列?</span></font></b></font></p>
<p class="MsoNormal"><span lang="EN-US"><b><font color="#FFFFFF"><font size="5">3</font></font></b></span><font color="#FFFFFF"><b><font size="5"><span style="font-family:宋体;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"">.设有编号为</span><span lang="EN-US">1</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman"">,</span><span lang="EN-US">2</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">,</span><span lang="EN-US">3</span><span style="font-family:
宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"">,</span><span lang="EN-US">4</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman"">的四辆车,顺序进入一个栈式结构的站台,试写出这四辆车开出车站的所有可能的顺序。</span></font></b></font></p>
<p class="MsoNormal" style="margin-left:21.0pt;text-indent:-21.0pt;mso-list:l2 level1 lfo4;
tab-stops:list 21.0pt"><font color="#FFFFFF"><span lang="EN-US" style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman""><b><font size="5">二、</font></b></span><b><font size="5" color="#FFFFFF"><span style="font-family:宋体;mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman"">设计算法题</span></font></b><span lang="EN-US"><font size="5"><b> <o:p>
</o:p>
</b></font></span></font></p>
<p class="MsoNormal" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo2;
tab-stops:list 18.0pt"><span lang="EN-US"><b><font color="#FFFFFF"><font size="5">1.<span style="font-style: normal; font-variant: normal; font-family: Times New Roman">
</span></font></font></b></span><b><font size="5"><font color="#FFFFFF"><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">假设称正读和反读都相同的字符序列为“回文”,例如,"</span><span lang="EN-US">abcddcba</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">"、</span><span style="font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">"</span><span lang="EN-US">qwerewq</span><span style="font-family:宋体;mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman"">"是回文,“</span><span lang="EN-US">ashgash</span><span style="font-family:宋体;mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman"">”不是回文。是写一个算法判断读入的一个以‘</span><span lang="EN-US">@</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman"">’为结束符的字符序列是否为回文。(</font></font><a href="ds3.1习题.HTM"><font size="5" color="#FFFF00">解答</font></a><font color="#FFFFFF" size="5">)</font></span></b></p>
<p class="MsoNormal" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo2;
tab-stops:list 18.0pt"><font color="#FFFFFF"><span lang="EN-US"><b><font size="5">2.<span style="font-style: normal; font-variant: normal; font-family: Times New Roman">
</span></font></b></span><b><font size="5"><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">设以数组</span><span lang="EN-US">se[m]</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">存放循环队列的元素,同时设变量</span><span lang="EN-US">rear
</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">和</span><span lang="EN-US">front</span><span style="font-family:
宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"">分别作为队头队尾指针,且队头指针指向队头前一个位置,写出这样设计的循环队列入队出队的算法</span><span style="font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">。</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman"">(</font></font><a href="ds3.2习题.HTM"><font size="5" color="#FFFF00">解答</font></a><font color="#FFFFFF" size="5">)</font></span></b></p>
<p class="MsoNormal" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo2;
tab-stops:list 18.0pt"><font color="#FFFFFF"><span lang="EN-US"><b><font size="5">3.<span style="font-style: normal; font-variant: normal; font-family: Times New Roman">
</span></font></b></span><b><font size="5"><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">设计一个算法判别一个算术表达式的圆括号是否正确配对。</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman"">(</font></font><a href="ds3.3习题.HTM"><font size="5" color="#FFFF00">解答</font></a><font color="#FFFFFF" size="5">)</font></span></b></p>
<p class="MsoNormal" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo2;
tab-stops:list 18.0pt"><font color="#FFFFFF"><span lang="EN-US"><b><font size="5">4.<span style="font-style: normal; font-variant: normal; font-family: Times New Roman">
</span></font></b></span><b><font size="5"><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
"Times New Roman"">写一个算法,借助于栈将一个单链表置逆。</span><span style="font-family:宋体;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman"">(</font></font><a href="ds3.4习题.HTM"><font size="5" color="#FFFF00">解答</font></a><font color="#FFFFFF" size="5">)</font></span></b></p>
<p class="MsoNormal"><span lang="EN-US"><font size="5" color="#FFFFFF"><b> <o:p>
</o:p>
</b></font></span></p>
<p class="MsoNormal" align="center"><b><a href="ds3.HTM"><font size="5" color="#FFFF00">返回</font></a></b></p>
<!--mstheme--></font>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -