亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? page297.html

?? wqeqwvrw rkjqhwrjwq jkhrjqwhrwq jkhrwq
?? HTML
字號:
<HTML>
<HEAD>
<TITLE>Exercises</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
 <img src="cover75.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cover75.gif" alt="Logo" align=right>
<b>Data Structures and Algorithms 
with Object-Oriented Design Patterns in C++</b><br>
<A NAME="tex2html5593" HREF="page298.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page298.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="next_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/next_motif.gif"></A> <A NAME="tex2html5591" HREF="page250.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page250.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="up_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/up_motif.gif"></A> <A NAME="tex2html5585" HREF="page296.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page296.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/previous_motif.gif"></A> <A NAME="tex2html5595" HREF="page9.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page9.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/contents_motif.gif"></A> <A NAME="tex2html5596" HREF="page620.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page620.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="index_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/index_motif.gif"></A> <BR><HR>
<H1><A NAME="SECTION0010700000000000000000">Exercises</A></H1>
<P>
<OL><LI> <A NAME="exercisetreesi">&#160;</A>
	For each tree shown in Figure&nbsp;<A HREF="page297.html#figtree18" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page297.html#figtree18"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>
	show the order in which the nodes are visited during
	the following tree traversals:
	<OL><LI> preorder traversal,<LI> inorder traversal (if defined),<LI> postorder traversal, and<LI> breadth-first traversal.
	</OL>
<P>
<P><A NAME="18571">&#160;</A><A NAME="figtree18">&#160;</A> <IMG WIDTH=575 HEIGHT=201 ALIGN=BOTTOM ALT="figure17918" SRC="img1211.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1211.gif"  ><BR>
<STRONG>Figure:</STRONG> Sample trees for Exercise&nbsp;<A HREF="page297.html#exercisetreesi" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page297.html#exercisetreesi"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A><BR>
<P><LI>
	Write a visitor that prints the nodes of a general tree
	in the format of Equation&nbsp;<A HREF="page251.html#eqntreestc" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page251.html#eqntreestc"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>.<LI>
	Derive an expression for the total space needed to
	represent a tree of <I>n</I> internal nodes
	using each of the following classes:
	<OL><LI> <tt>GeneralTree</tt> defined in Program&nbsp;<A HREF="page276.html#proggentree1h" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page276.html#proggentree1h"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>,<LI> <tt>NaryTree</tt> defined in Program&nbsp;<A HREF="page282.html#prognarytree1h" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page282.html#prognarytree1h"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>, and<LI> <tt>BinaryTree</tt> defined in Program&nbsp;<A HREF="page289.html#progbintree1h" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page289.html#progbintree1h"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>.
	</OL><LI> <A NAME="exercisetreesfullnode">&#160;</A>
	A full node in a binary tree is a node with two non-empty subtrees.
	Let <I>l</I> be the number of leaf nodes in a binary tree.
	Show that the number of full nodes is <I>l</I>-1.<LI>
	The generic <tt>DepthFirstTraversal</tt> routine defined in
	Program&nbsp;<A HREF="page268.html#progtree1c" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page268.html#progtree1c"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> is a recursive function.
	Write a non-recursive depth-first traversal routine
	that has exactly the same effect as the recursive version.<LI> <A NAME="exercisetreesprefix">&#160;</A>
	Program&nbsp;<A HREF="page296.html#progapp06bc" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page296.html#progapp06bc"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> defines a visitor that prints
	using <em>infix</em> notation
	the expression represented by an expression tree.
	Write a visitor that prints the same expression
	in <em>prefix</em> notation with the following format:
	<P> <IMG WIDTH=339 HEIGHT=14 ALIGN=BOTTOM ALT="displaymath64320" SRC="img1212.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1212.gif"  ><P><LI>
	Repeat Exercise&nbsp;<A HREF="page297.html#exercisetreesprefix" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page297.html#exercisetreesprefix"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>,
	but this time write a visitor that the expression
	in <em>postfix</em> notation with the following format:
	<P> <IMG WIDTH=288 HEIGHT=12 ALIGN=BOTTOM ALT="displaymath64321" SRC="img1213.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1213.gif"  ><P><LI>
	The <tt>InfixVisitor</tt> defined in Program&nbsp;<A HREF="page296.html#progapp06bc" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page296.html#progapp06bc"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>
	prints many redundant parentheses because it does
	not take into consideration the precedence of the operators.
	Rewrite the visitor so that it prints
	<P> <IMG WIDTH=296 HEIGHT=13 ALIGN=BOTTOM ALT="displaymath64322" SRC="img1214.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1214.gif"  ><P>
	rather than
	<P> <IMG WIDTH=363 HEIGHT=13 ALIGN=BOTTOM ALT="displaymath64294" SRC="img1210.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1210.gif"  ><P><LI> <A NAME="exercisetreespostfix">&#160;</A>
	Consider postfix expressions involving only binary operators.
	Show that if such an expression contains <I>n</I> symbols,
	it always has (<I>n</I>-1)/2 operators and (<I>n</I>+1)/2 operands.<LI> <A NAME="exercisetreestotal">&#160;</A>
	Prove Theorem&nbsp;<A HREF="page294.html#theoremtreesiv" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page294.html#theoremtreesiv"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>.<LI> <A NAME="exercisetreescompare">&#160;</A>
	Generalize Theorem&nbsp;<A HREF="page294.html#theoremtreesiv" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page294.html#theoremtreesiv"><IMG  ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> so that it applies to <I>N</I>-ary trees.<LI>
	Consider two binary trees,
	 <IMG WIDTH=149 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline64124" SRC="img1189.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1189.gif"  > and  <IMG WIDTH=152 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline64126" SRC="img1190.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1190.gif"  > and
	the relation  <IMG WIDTH=10 HEIGHT=8 ALIGN=BOTTOM ALT="tex2html_wrap_inline64352" SRC="img1215.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1215.gif"  > given by
	<P> <IMG WIDTH=500 HEIGHT=95 ALIGN=BOTTOM ALT="equation18448" SRC="img1216.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1216.gif"  ><P>
<P>
	If  <IMG WIDTH=60 HEIGHT=23 ALIGN=MIDDLE ALT="tex2html_wrap_inline64354" SRC="img1217.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img1217.gif"  >,
	the trees are said to be <em>isomorphic</em><A NAME=18463>&#160;</A>.
	Devise an algorithm to test whether two binary trees are isomorphic.
	What is the running time of your algorithm?
</OL><HR><A NAME="tex2html5593" HREF="page298.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page298.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="next_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/next_motif.gif"></A> <A NAME="tex2html5591" HREF="page250.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page250.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="up_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/up_motif.gif"></A> <A NAME="tex2html5585" HREF="page296.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page296.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/previous_motif.gif"></A> <A NAME="tex2html5595" HREF="page9.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page9.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/contents_motif.gif"></A> <A NAME="tex2html5596" HREF="page620.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page620.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="index_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/index_motif.gif"></A> <P><ADDRESS>
<img src="bruno.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/bruno.gif" alt="Bruno" align=right>
<a href="javascript:if(confirm('http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html'" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html">Copyright &#169; 1997</a> by <a href="javascript:if(confirm('http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html'" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html">Bruno R. Preiss, P.Eng.</a>  All rights reserved.

</ADDRESS>
</BODY>
</HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲国产美女国产盗摄 | 久久国产精品露脸对白| 日韩电影免费一区| 老司机精品视频一区二区三区| 蜜桃精品在线观看| 国产福利视频一区二区三区| eeuss国产一区二区三区| 色偷偷久久人人79超碰人人澡| 色综合久久综合中文综合网| 欧美日韩另类国产亚洲欧美一级| 欧美主播一区二区三区美女| 欧美一级二级在线观看| 国产精品入口麻豆原神| 亚洲主播在线观看| 青青草视频一区| 国产一区二区0| 色综合久久中文字幕| 7777精品伊人久久久大香线蕉最新版| 日韩色视频在线观看| 中文字幕第一区第二区| 国产精品第五页| 亚洲精品国产a| 免费人成精品欧美精品| 成人激情电影免费在线观看| 91久久精品一区二区| 日韩一区二区免费在线观看| 久久久久久亚洲综合影院红桃 | 成人黄色777网| 欧美日韩成人综合天天影院| 欧美成人性福生活免费看| 亚洲精品成人a在线观看| 日本在线播放一区二区三区| 国产ts人妖一区二区| 欧美自拍偷拍一区| www国产亚洲精品久久麻豆| 亚洲丝袜制服诱惑| 国产在线精品一区二区夜色 | 亚洲mv大片欧洲mv大片精品| 风流少妇一区二区| 日韩免费高清视频| 亚洲一区二区精品久久av| 3d动漫精品啪啪| 亚洲视频一区二区在线| 国产精品99久久久| 91精品国产一区二区三区蜜臀| 亚洲伦在线观看| 顶级嫩模精品视频在线看| 日韩欧美一区在线| 亚洲成人免费观看| 一本到不卡免费一区二区| 中文字幕av一区二区三区高| 精品一区二区三区免费播放 | 欧美aaaaa成人免费观看视频| 一本久道久久综合中文字幕| 国产精品毛片a∨一区二区三区| 韩国成人在线视频| 日韩免费观看高清完整版| 日欧美一区二区| 欧美日韩一二区| 一区二区三区精品久久久| 91丨porny丨国产| 国产精品色噜噜| 不卡视频免费播放| 国产精品久久久久久户外露出 | 1区2区3区国产精品| 成人一区在线观看| 国产日韩欧美精品一区| 国产乱一区二区| 久久一夜天堂av一区二区三区| 加勒比av一区二区| xnxx国产精品| 国产精品自拍三区| 欧美高清在线精品一区| av一区二区三区四区| 最新久久zyz资源站| 色婷婷av一区二区| 亚洲成av人片一区二区| 这里只有精品99re| 久久精品理论片| 久久在线观看免费| 成人99免费视频| 亚洲欧美在线另类| 色哟哟一区二区| 五月天久久比比资源色| 5858s免费视频成人| 免播放器亚洲一区| 国产视频在线观看一区二区三区| 成人免费视频播放| 亚洲精品一二三四区| 欧美日韩视频在线一区二区| 久久精品国产亚洲a| 国产亚洲欧美色| 91麻豆精品在线观看| 午夜精品影院在线观看| 欧美tk丨vk视频| 高清国产一区二区| 亚洲美女区一区| 在线不卡免费av| 国产成人亚洲综合色影视 | 在线电影院国产精品| 蜜桃久久久久久| 国产精品久久久久久久久免费樱桃 | 欧美午夜不卡视频| 麻豆一区二区三| 国产精品久久久久一区二区三区 | 人人狠狠综合久久亚洲| 久久精品一区二区三区不卡 | 亚洲国产你懂的| 精品国精品自拍自在线| 99re热这里只有精品视频| 午夜欧美大尺度福利影院在线看 | 国产成人免费在线观看不卡| 亚洲女同ⅹxx女同tv| 91精品国产欧美一区二区| 国产成a人亚洲精| 亚洲国产精品久久艾草纯爱| 久久婷婷一区二区三区| 一本大道av伊人久久综合| 免费成人在线视频观看| 亚洲同性gay激情无套| 欧美一卡2卡三卡4卡5免费| 成人国产在线观看| 蜜桃精品视频在线观看| 亚洲日本欧美天堂| 精品国产免费一区二区三区四区 | 首页国产欧美日韩丝袜| 欧美高清在线精品一区| 91精品国产免费| 91在线精品一区二区三区| 蜜桃av一区二区| 亚洲免费高清视频在线| 欧美videofree性高清杂交| 一本到高清视频免费精品| 国产一区二区三区黄视频| 亚洲成人黄色小说| 国产精品视频线看| 日韩欧美的一区| 欧美日韩一区不卡| 成人aa视频在线观看| 韩国欧美国产一区| 五月天中文字幕一区二区| 亚洲色图制服诱惑| 国产欧美日产一区| 精品国产一二三区| 欧美日韩久久一区| 91免费版在线| 高清不卡在线观看| 精品亚洲aⅴ乱码一区二区三区| 亚洲午夜三级在线| 亚洲欧洲中文日韩久久av乱码| 国产亚洲女人久久久久毛片| 日韩欧美国产综合在线一区二区三区| 色噜噜狠狠色综合中国| 成人精品电影在线观看| 国产一区二区三区在线观看精品| 日本美女一区二区| 午夜精品一区在线观看| 亚洲一区在线观看网站| 亚洲欧美日韩国产另类专区| 国产精品久久久久影视| 国产日韩欧美电影| www激情久久| 久久综合九色综合97婷婷女人| 欧美一区二区在线视频| 欧美日韩在线不卡| 日本高清无吗v一区| 91在线视频免费91| 91香蕉视频在线| 99热在这里有精品免费| 福利电影一区二区三区| 盗摄精品av一区二区三区| 国产精品99久久不卡二区| 国产永久精品大片wwwapp| 国产综合久久久久久久久久久久| 国内欧美视频一区二区| 国产一区二区电影| 国产精品99久久久| 国产成人免费视频精品含羞草妖精 | www.av精品| 中文字幕永久在线不卡| 日韩欧美激情在线| 色综合 综合色| 91女厕偷拍女厕偷拍高清| 成人av在线电影| 不卡区在线中文字幕| 懂色av一区二区在线播放| 国产精品一区二区视频| 粉嫩av亚洲一区二区图片| 国产在线播放一区| 丁香网亚洲国际| 成人性生交大片免费看中文| 99国内精品久久| 色网站国产精品| 欧美日韩日本视频| 欧美一级生活片| 久久在线观看免费| 国产精品色在线| 成人听书哪个软件好| 国产一区二区精品久久| 黄色成人免费在线|