<?xml version="1.0" encoding="GBK" ?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dcterms="http://purl.org/dc/terms/">
 <channel>
  	  <title><![CDATA[阿巴睇的博客]]></title>
	  <link>http://cgbluesky.blog.163.com</link>
	  <description><![CDATA[人生一年又一年,只要每年都有所积累,有所成长,都有那么一次自己认为满意的花开时刻就好。即使一时不顺,也要敞开胸怀。生命的荣枯并不是简单的重复,一时的得失不是成败的尺度。花开不是荣耀,而是一个美丽的结束,花谢也不是耻辱,而是一个低调的开始。
 学习是一种信仰，一种追求，一个理想，不是应付生活，应付人生，应付答案]]></description>
	  <language>zh-CN</language>
	  <pubDate>Tue, 9 Feb 2010 21:14:42 +0800</pubDate>
	  <lastBuildDate>Tue, 9 Feb 2010 21:14:42 +0800</lastBuildDate>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <generator><![CDATA[NetEase Space]]></generator>
	  <managingEditor><![CDATA[cgbluesky]]></managingEditor>
	  <webMaster><![CDATA[阿巴睇]]></webMaster>
		  <ttl>120</ttl>
	  <image>
	  	<title><![CDATA[阿巴睇的博客]]></title>
	  	<url>http://ava.bimg.126.net/photo/kRafGlrIA734cFUU_3rNWg==/186617909559646149.jpg</url>
	  	<link>http://cgbluesky.blog.163.com</link>
	  </image>
  <item>
  	<title><![CDATA[奇瑞,一群为理想而战的疯子（转载）]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/2412355820100261333893</link>
    <description><![CDATA[<div><P><SPAN>这里还有一篇更精彩，更详细的</SPAN></P>
<P><SPAN><A href="http://wszyw233.blog.163.com/blog/static/2660266200759475704/">http://wszyw233.blog.163.com/blog/static/2660266200759475704/</A></SPAN></P>
<P><SPAN>最早见于《商界》杂志2007 <BR>&nbsp;&nbsp;&nbsp;&nbsp;曾经有一位机械工业部的老部长在北京长安街上数汽车，发现街上跑的轿车95%以上是外资品牌。民族汽车败落如此，老部长痛心疾首。 <BR>多年后的今天，记者在安徽芜湖，也无数次地为中国汽车心潮难平，然而记者心中充满的是感动，为一个叫奇瑞的公司。没想到在“铁桶一般、完全不可能”的条件下，竟然还有这样一群疯狂的、不服输的中国人，以“不成功就跳长江”的必死决心，顶着强大的外资压力将一个崭新的民族汽车品牌，顽强地扛了起来！ <BR>　　只为了实现一个梦想。他们抛妻别子，只身从四面八方来到芜湖。甚至许多造了一辈子汽车却硬是没造出过一辆属于中国人自己的轿车的老工程师们，六七十岁了还离别老伴来到安徽，加入年轻人的队伍，吃苦受累从零干起。“只有造出自己的轿车，人生才能画上句号……” <BR>　　“整个奇瑞的历史是一部让人流泪的历史。”奇瑞一位年轻的司机告诉记者。他说央视来采访时，董事长尹同耀说过一句话至今让人震憾：“奇瑞是在最关键的时刻做了一件正确的事。” <BR>　　——“关键”到了什么时刻？到了中国汽车工业已沦为外国品牌全球战略在中国的一枚棋子。中国人出钱出人出市场，外国人出技术出品牌，合资双方各占 50%。事实上，外国人一箭双雕，他们用中国人的钱做自己的品牌赚中国人的钱，同时又牢牢扼制住了中国民族汽车产业发展的咽喉。他们并不向中国人传授核心技术，甚至中国人连改动一下车门拉手、加一个螺帽的权力都没有。外国人一旦拆资，留给中国人的等于一片空白。 <BR>　　中国汽车已到了不能自主、沦为外国人加工车间的悲惨时刻。中国汽车再也没有退路。 <BR>　　1997年，“不服输”的奇瑞开始了“孤独的战斗”。 <BR>　　一些心中有梦想的汽车人涌向了芜湖。年轻人、老年人来了，有的从美国汽车城底特律来，有的从日本来。2000年，这位大学里学汽车制造的年轻人听说芜湖有一家叫奇瑞的公司正在努力造中国人自主品牌的轿车时，毅然放弃了深圳三四千的收入来到奇瑞，甘愿拿只够吃饭的600元月薪，当一名司机。他想和其他人一起战斗！ <BR>　　谈至此，记者看见这位年轻司机的眼眶里，已满是泪水。 <BR>&nbsp;&nbsp; <BR>　　就是这一群“为理想而战的疯子”，从一个到两个，到八个，到五十个，到数百个数千个人，为“造中国人自己的好车”聚集到了一起，重新点燃了希望。他们 “谋于陋室，成于荒滩”，在寒风呼啸四壁漏风的“小草房”中迈开了第一步。干部们是“715干部”，每周工作7天每天工作15个小时，研发人员、工人们甚至半年只休息过春节一天…… <BR>　　然后仅仅五年，奇瑞成了中国的骄傲。 <BR>　　今天，奇瑞已经出口到了全球50多个国家和地区，占中国汽车出口量70%以上，所到之处华侨们总是万分激动。国外的车展上，奇瑞的东方之子更是被外商们摆在奔驰、奥迪同一个展厅。这一切都是合资品牌们想都不敢想的事。 <BR>　　2005年，董事长尹同耀以其杰出贡献被评为“CCTV年度经济人物”。2006年奇瑞被美国《财富》杂志评为“最受赞赏的中国公司”第11位，成为中国所有合资非合资汽车企业中唯一一家进入此排行榜前25位的企业。2006年奇瑞各款车销售30.5万辆，紧随上海通用、南北两个大众之后，稳居中国乘用车四强。 <BR>　　2007年3月，奇瑞的月销量跃居行业第一。7月4日，与美国戴勒姆·克莱斯勒汽车公司签定协议，奇瑞以其优秀的研发能力和生产能力为克莱斯勒代工小型车——奇瑞再次改写历史：过去是外国人掌握核心技术，今天是中国人！ <BR>　　奇瑞无疑已成为了一个符号，一个中国汽车产业不甘沉沦、自主自强的精神符号。 <BR>“干不成，我跳长江！” <BR>当尹同耀还在长江边的一所中学上学时——那是上世纪70年代末，这个国家的政府正在和德国大众谈判是否能引入一条轿车生产线。很快，少年尹同耀背着行囊从安徽巢湖出发去省会，成了合肥某高校汽车制造专业的学生。毕业时，德国大众与长春一汽的合资公司也成立了，他成为了其中的一员。12年后的1996年，当他离开合资公司时，已经是一汽“十佳杰出青年”，并以总装车间主任的身份主持生产了中国第一辆奥迪车。 <BR>　　那时，在中国市场上，自主品牌轿车还难得一见。 <BR>　　尹同耀离开一汽，直接去了安徽芜湖，在那里芜湖副市长詹夏来正等待着他去主持一个汽车项目。奇瑞就这样，从尹同耀风尘仆仆的行程开始了。 <BR>　　芜湖地方政府想干汽车由来已久。在 1992~1993年经济过热时期，芜湖一家村办工厂一年敲敲打打几百台车，就是上亿的产值，这引发了芜湖政府干汽车的决定。年轻的副市长詹夏来敢想敢干，1995年初前脚跑到英国与威尔士一家中间商谈定了一条年产30万台发动机的二手福特生产线，后脚就来到长春一汽参观考察。其实考察是虚，挖人是实。 </SPAN></P>
<P><SPAN><SPAN>这一挖，挖到了安徽老乡尹同耀。 <BR>　　詹说：“总是为外国人做事没有出息。你来，我们做中国人自己的车。”就这句话，深深刺痛了尹同耀。没有人比他对这句话体会更深刻了。在外方占品牌和技术主导地位的合资厂干了十多年，外国人瞧不起中国汽车工业颐指气使的态度历历在目。更主要的是，外国人赚够了中国人的钱，却并不在技术上帮助中国，这致使民族汽车产业前景黯淡。 <BR>　　多年来尹同耀一直自嘲身处“伪军阵营”，胸中的抱负不言而喻。但他越来越强烈地意识到，自己造再多再好的车，心里也痛快不起来。有一种灰暗有一种忧郁一直藏在心底，他知道这是因为自己内心深处的一种期待不能被满足，而形成的一种压抑。 <BR>&nbsp;&nbsp; <BR>　　一个人改变命运的方法，在于改变对待命运的态度。尹同耀不想再压抑自己，他要让自己的整个能量释放出来，释放在中国的阳光下。他终于下定决心迎接命运的挑战。他抛妻别子，与几个事先谈定的志同道合的同事，踏上了南下的列车—— 辞职，到芜湖去，“做中国人自己的车！” <BR>　　八个人来到需要从零开始的地方，眼前的一切让他们惊呆了：除了农田荒滩乱草和几间破败的茅屋，什么都没有！一群人仿佛坠入人迹罕至的原始洪荒中，创业艰难可想而知。“即使这样，我们仍然迈出了第一步。租了农民的旧房子做办公室，开始做技术规划，画图，然后一点点招人，搞培训。”面对过去，尹同耀已经很淡定，仿佛说着别人的事。“起步时太艰难了，没钱，没人，没技术，一切都从无到有，连饭都是自己做。有时真觉得，这是不是开玩笑啊？！” <BR>　　但梦想在前面，就不会退缩。“最重要的是要有初恋般的激情，在我们企业，这叫‘不服输’！”从那时起，奇瑞人什么都敢想敢干的冒险精神，就已深入了组织的基因。而这种冒险精神，正是促使人们进步最重要的素质之一。 <BR>　　一切都悄无声息地、轰轰烈烈地展开了。这时花 2980万美元买来的二手发动机生产线，8000多吨重的设备已运到了芜湖港。发动机是汽车的心脏，又没有够大的仓库，他们就一边将设备拆成8部分存放在芜湖市的8个仓库里，20个人轮番除锈涂油养护，另一边则加紧建厂。 <BR>　　1997年3月，奇瑞公司的前身安徽汽车零配件有限公司注册成立。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;汽车项目要成功，发动机生产线更是要尽快运转起来。因为如果发动机生产线安装停滞不前，在潮湿的长江边，设备就会渐渐锈成 8000吨废铁！而买这些设备的钱，是贫穷的安徽省“砸锅卖铁的钱，是农村老太太卖鸡蛋的钱”！面对这笔钱，尹同耀对负责发动机的冯武堂说：“如果建厂失败，你就跳进35米深的基坑，把自己埋在里面吧。” <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>　　置之死地而后生。基坑上的第一根柱子很快立起来了，工程进度加快。办公桌不够用了，他们就用设备包装板搭成许多简易办公桌，书记市长领着大家围着木板桌在四壁漏风的小草房内召开一项又一项重要会议。没钱，不敢去买空调，冬天技术人员的手冻得连画图的笔都拿不稳…… <BR>　　在如此艰苦的条件下，机器仍在日夜轰鸣，工地一天天艰难扩大，投入的人力越来越多，厂房骨架渐渐有了雏形。就在这时，尹同耀也渐渐开始对外国工程技术人员不满意了。 <BR>&nbsp;&nbsp; <BR>　　原来，为了整个设备安装调试成功，中英双方达成了 “交钥匙工程”的协议，由外国人把生产线拆下来，运过来后再装上，调试好再移交给中方。然而中国人渐渐发现这些外国人并没有想象中那么能干，而且他们慢慢悠悠地上午一杯咖啡，下午一杯咖啡，中午晒晒太阳，晚上跳舞唱歌。中国人耗不起时间，心如火燎地说我们一块干吧。外国人说你们不能干，干了我们不负责任。再后来发现他们是故意拖延时间想让中国人多加钱。 <BR>　　实在不行了，再耗下去整个项目都非常危险。然后，尹同耀与市里主要领导开了三个晚上的会，没人敢做决定，“离开外国人行吗”？ <BR>　　1998年11月26日，又一个晚上，熟悉技术情况的尹同耀咬咬牙说：“我来承担责任吧。让外国人走，我们自己干。”詹夏来面无表情，两眼盯着他：“干不成怎么办?”尹同耀将心一横：“干不成，我跳长江！” <BR>　　流过汗，流过泪，努力过，坚持过 <BR>　　外国人走了。再硬的骨头自己也要啃下去。 <BR>　　奇瑞人最大极限地发扬他们的创业精神，一是赌博，二要拼搏，三要自己干，四是要承担责任。每个人都靠着这种自立自强、创新创业的拼搏精神，日夜不停地向前冲。到1999年初，生产线终于安装完毕。 <BR>　　其中有说不完的感人故事。 <BR>　　要安装设备了，机器要从八个仓库运到发动机厂房。为了不丢掉一颗螺丝钉，在刺骨的寒风里，工人们三五成群地骑着自行车跟在卡车后，看见掉一颗螺丝钉马上捡起来。因为缺一颗，都得用外汇去买。骑着自行车又要看汽车，又要看地面，很不安全。好几次被交警拦住，结果无不感动放行。 <BR>&nbsp;&nbsp; <BR>　　为了完全掌握发动机和生产线技术，一个叫曹玉龙的年轻人肩负着从英国拿回图纸的使命。软盘要拿，但中英两边的计算机很可能不兼容打不开。尹同耀对他说： “这图纸就是你的命！”等了一个月，一百五六十斤重的图纸终于拿到，他匆匆赶到机场，却因为超重无论如何不能通过安检。他知道图纸比什么都重要，一狠心把自己给亲人朋友买的所有贵重细软物品连带自己的行李换洗衣物统统扔在了英国。 <BR>　　最后他背着这箱比人还重的图纸，蓬头垢面筋疲力尽地回到小草房里。 </SPAN><BR></SPAN><SPAN>有一个在全世界都没有过的勤俭节约的故事。生产线装好了，需要用发动机毛坯来钻孔给生产线定位，毛坯只买到了500套，尹同耀又命令必须出500台发动机，这意味着调试过程中一个都不能费。这简直不可思议，因为在正常情况下要调准就得耗费掉几十上百个！ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>　　但军令如山。技术人员老赵想出了办法，如果钻孔位置不对，他就用同样大小的铝棒镶进孔内补平又用。一个毛坯这样反反复复用了几十次，上面密密麻麻地布满了铝棒白色的小点。随后它成了奇瑞的传家宝。 <BR>　　这就是逼出来的自主创新，因为没有钱。不像合资汽车厂，同样是中国人出钱，一投就是近20亿美金，而奇瑞直到汽车下线，总共投了还不到10亿人民币。 <BR>　　火灾发生过，他们靠团队的力量扑灭了大火，救出了掉进火海的队友；水灾发生过，一个接一个人在深夜的电闪雷鸣滂沱大雨中，爬上数十米高没有任何防护的厂房顶，去堵爆裂的大洞…… <BR>　　所有的故事都让人唏嘘不已。他们连死的决心都敢下，还有什么困难不能克服呢！ <BR>　　1999年4月27号下午两点，生产发动机的所有配件全到齐了，当夜，第一台发动机顺利下线，点火成功。在场的所有人激动得抱头痛哭。为了这一刻，他们艰苦奋斗了三年。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1999年5月18日，奇瑞正式宣布发动机点火成功。一颗日益强大的汽车的心脏开始跳动起来，中国人的汽车梦想开始有了不竭的动力。 <BR>&nbsp;&nbsp; <BR>　　但尹同耀更明白每一个人的汽车梦想都是靠他人来实现的。从决定到芜湖的第一天起，他就没有停止过四处招揽可以一起来实现梦想的人。他坦诚相待，到处 “忽悠”人才，用尹同耀自己的话说是“连诱带骗，费尽心机”。到国外考察、谈判，尹同耀常常借上厕所的机会和自己看中的人才搭讪，先要手机号码，再让人去软磨硬泡。来自日本的寺田真二就这样加入了奇瑞。 <BR>　　尹同耀任奇瑞副总多年，总经理职位一直空着，他常对“海龟”说：“你回来，领导我。”尹同耀招兵买马更善于“杀熟”，杀同学、同乡、老同事：“来帮帮我吧，就三个月，项目结束了你就回去。”而一个项目往往三年都完不了，很多人就此留了下来；又熟又在海外的，他就用激将法骂，“民族汽车这样危急，你不回来你对得起国家对得起爹娘吗？！” <BR>　　自主开发“造中国车”的大旗，是中国汽车人最不可抗拒的力量。许多老工程师听到这几个字眼睛就发红，不顾老命要来奇瑞。至今，奇瑞还有一个快80岁的老工程师，做不动事了他就在办公室写《中国汽车发动机史》。他已经成了奇瑞的精神符号。 <BR>　　就这样，随着国内大汽车集团合资后纷纷停止自主研发项目，大量爱国家又深感“无用武之地”的英雄们被尹同耀罗至帐下。在奇瑞的技术团队中，有来自国内三大汽车集团和合资汽车企业大量的技术人员，有20多位清华学子，有上千名大学生、硕士、博士。有的人放弃上百万的年薪来了，有的人百万年薪也挖不走。 “奇瑞是一个想干事、能干事的企业。奇瑞给我们提供了舞台，可以让我们实现未曾实现的梦想。” <BR>　　许多人还记得，当年尹同耀站在长满荒草的空地上，兴奋地指着远方告诉他们哪里是发动机厂，哪里是研发中心，哪里是整车厂。然后大家一起热血沸腾…… <BR>　　也有人不为所动，比如一个诨名叫大高的人，死活不松口。当尹同耀把他带进工棚，当他走进工棚看到奇瑞样车模型那一瞬，只觉得眼前一亮，大彻大悟，顿感人生的意义不过如此。于是加入了这支当时还只有 50多人的团队。 <BR>　　每个人在适合自己能力的位置上把事情做到最好，人生的意义不过如此。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;一辆汽车有上万个零部件，它的正常运行需要这个庞大的系统协同工作。汽车制造厂的运作更是如此，有了发动机有了人才还远远不够，还需要整个协作制造系统同时配合。 <BR>&nbsp;&nbsp; <BR>　　路在一步一步走，但前面有更大的困难：缺钱、缺人、缺经验、缺技术、缺配套商，也缺用户。为了让车下线，尹同耀带着自己的人才四处寻找配套商，“我们那时候叫‘磕头买’、‘磕头卖’，完全是在求爹爹告奶奶，就差真的磕头了。但是没人愿意提供零部件，因为没有人愿意为初出茅庐弱小无比的奇瑞投资开模具。他们认为奇瑞不能成功，哪怕投入一分钱，也是打水漂。 <BR>　　“我们谈了不知道有多少家企业，他们提出的很多条件都是‘不平等条约’，但是为了把车做成，我们都答应。即使是这样，最后许多企业还是说，这违反了他们在中国的产品战略，给取消了。” <BR>　　流过汗，流过泪，努力过，坚持过，不放弃，向前走。总会有人看好奇瑞的理想和精神，总会有人愿意给奇瑞配套和奇瑞一起成长，终于有了第一家，然后有了第二家，第三家…… <BR>&nbsp;&nbsp;&nbsp;&nbsp;1999 年12月18日，第一辆奇瑞风云轿车驶下生产线。33个月，造就一座现代化轿车工厂，这是世界汽车史上的奇迹！ <BR>　　有意思的是，奇瑞曾经叫 “成功”。 <BR>　　当尹同耀回答记者，奇瑞这个名字是怎么来的时，他说：“1999年12月18日，当看着自己造的第一辆车亮相时，我们兴奋不已，高兴之余，突然发现还没取名。但取什么名字呢？几个人商量来商量去，最后老领导说，我们终于成功造出了自己的车，这车就叫‘成功’吧。虽然牌子定了，但我们几个年轻人，总觉得这个名字不好，太直白、太土。于是私底下又倒腾，要改得新奇一些……” <BR>　　尹同耀清楚地记得，当时在庆祝新车成功下线时，大家欢呼着，叫着“CHEERY——”后来想想，干脆就以这个音译CHERY(奇瑞)为名字，也许更好。CHEERY去掉一个E，象征着永不满足，中文：奇，有出奇制胜、成功的意思；瑞，寓意着吉祥，而且与奇瑞标志也吻合。奇瑞汽车标志的整体是英文字母 CAC一种艺术化变形；CAC即英文 Chery automobile corporation limited的缩写，中文意思是奇瑞汽车有限公司。最后，尹同耀几个人都觉得奇瑞这个名字好，就一致要求把“成功”改成了“奇瑞”。 </SPAN><BR><SPAN>这样，中国的汽车自主品牌——奇瑞，正式诞生了。 <BR>　　那一刻，几乎所有人都有一种事业的成就感，造出这样的车，造出比这更好的车，就是人生最大的意义。不过，那时的奇瑞只是一颗刚刚从土里钻出来的嫩芽，随时都面临着未知的生死考验。 <BR>　　生死考验的一刻，随着汽车的下线，也同时摆在了尹同耀们的面前——奇瑞并没有登上国家轿车生产目录，这意味着奇瑞是不被国家允许的“黑车”、“黑户口”，很有可能在襁褓中夭折——这成了尹同耀最大的隐忧——以致于每次庆祝成功他都难以尽情投入。他的责任太大，所有人都看着他。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;但既然孩子生下来了，就得让他活下去，于是尹同耀悄悄地干活。2000年5月9日，四川捷顺成为奇瑞公司的第一家经销商，首次订购一百辆。从此奇瑞轿车悄无声息正式走向市场。2000年，奇瑞生产了 2000多辆汽车。为了让这个没有生产汽车许可证的企业能够生存下去，在安徽省和芜湖市两级政府的帮助下，指定奇瑞汽车为芜湖的出租车用车，并为其上了牌照。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;毕竟不合法，很快奇瑞被国家有关部门要求停产。 <BR>　　与此同时，经过国家经贸委等多方努力，奇瑞进行了加入上汽集团的谈判。这是一个具有“中国特色”的完全不平等的谈判。最后奇瑞同意将20%的注册资本无偿划到上汽集团的账下，奇瑞则使用上汽的目录。为了完全自主，奇瑞对上汽提出了“四不”原则，即上汽不投资、不参与管理、不承担风险和不分红。同时上汽也给奇瑞提了很多“不”，如上汽的销售网络奇瑞不能使用、上汽管理经验奇瑞不能学习……这一切，有点奇迹。</SPAN> <BR><SPAN>记者与奇瑞的高层有一段对话，解释了自主品牌怎样带来成本优势。 <BR>　　奇瑞：如果是自主品牌我就可以决定是否自己生产发动机，生产怎样的发动机，装在怎样的车上。 <BR>&nbsp;&nbsp; <BR>　　记者：如果自己生产发动机，企业能够获得怎样的成本优势？ <BR>　　奇瑞：如果汽车厂不生产发动机，别人卖给你要多少就得多少。比如日本的×××款发动机他要卖18000元，那就是这个价；如果你自己生产发动机，对方如果还想卖给你，而你又可要可不要，他就会说卖你12000元吧。差别太大了。 <BR>　　记者：显然对方还是赚了你的钱。那是否就意味着如果用自己的发动机，还能在12000的基础上再降很大一部分？ <BR>　　奇瑞：我们自己的×××型和×××型发动机，都只卖几千块钱。 <BR>　　记者：至少是一半？ <BR>　　奇瑞：或者是60%左右。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;　记者：那么和用那个18000的比起来，用自己的发动机整车价格至少降低了10000多元。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;奇瑞：是的，你应该看出，价格的降低来自利润构成的改变，而不是品质的改变。这就是我们性价比非常高的原因。又比如，最初我们的QQ还没大量生产，用的是东莞的465发动机。那时候，QQ最便宜3.5万左右。而我们QQ自己的发动机大批量生产以后，我们就自主决定推出2.98万一辆的QQ，发动机质量比原来还要好。这就是自主品牌提高性价比的原因。 <BR>&nbsp;&nbsp; <BR>　　掌控出口的命运 <BR>　　2001年10月是一个特别值得纪念的日子，奇瑞的第一批车出口到了中东，从此拉开了奇瑞海外销售的序幕。杜武杰，芜湖海关副关长，当天他获得消息： “芜湖奇瑞从上海海关出口了10辆车。”杜武杰不敢相信，不会弄错吧？奇瑞不就是街上跑的那出租车吗？这“初生牛犊”能出口？轿车向来只有进口的啊。 <BR>　　得知消息确切，杜武杰高兴得四处宣传。 <BR>　　“所有人都很好奇，外国人怎么可能知道奇瑞？第一批车是怎样实现出口的？” <BR>　　尹同耀笑得很开心：“第一批车出口有一个阴差阳错的故事。当时一个叙利亚的汽车商偶然在北京大街上看见一款从未见过的车，觉得很漂亮。一问，说是中国生产的奇瑞。再查，查到产自安徽芜湖。于是这个叙利亚人找了一个中国朋友带着他直接杀到了芜湖，要求在叙利亚卖奇瑞。我们回答不出口，国内的需求都还满足不了哩。 <BR>　　“这人就说，那我找你老板吧。老板在上海。我那时正好在上汽谈事儿，这老兄很执著地追到上海，事先在公司把我电话要到，一个电话打进来，说希望跟我谈。我说我没有时间啊，我们对出口没有兴趣。我当时很土老冒，忙着满足国内。他说我都追了这么远，从北京到芜湖再折腾到上海，你见我一面都不行吗？我说我正在开会实在没有地方见你。” <BR>&nbsp;&nbsp; <BR>　　“据说你们是站在马路上谈了十分钟？”“是的。我们在大街上站着谈。他就说，我要你给我一个价钱，我要200辆车吧。不行，最多给你10辆。我认为他是说着玩的，就麻着胆子给他开了一个价，愿干干，不愿干拉倒。于是我们就拜拜了。不久钱真的打过来了，于是我们10辆车就过去了。这就是第一笔生意。不久 200辆车都出去了。” <BR>&nbsp;&nbsp; <BR>　　后来尹同耀一算，发现出口很赚钱。于是加大了出口的力度。 <BR>　　这是中国汽车有史以来实现的第一批出口。那些合资品牌不出口，是因为合资车是外国人占领中国市场的一枚棋子，他们在国内卖比在国外卖赚钱得多，而且他们怎么可能让占一半股份的中国人到国外去抢他们自己的饭碗？“只有自主品牌，才能掌控出口的命运。” <BR>　　从2002年春天开始，公司接到的来自中东地区的电话突然增加了，什么样的电话都有，华侨在电话里哭，说为中国人争了气；各种各样的中东销售商在电话里吵着要卖车；大使馆的人说奇瑞让他们在外国人面前说话更管用了…… <BR>　　几乎所有奇瑞人都强烈地感受到了这份工作沉重的使命。尹同耀开始组织最强的力量研究国际市场。国内国际市场井喷，所有人都更加忘我地努力。干部成了 “715干部”（一周工作7天每天15个小时），员工们常常是一年只休息两三天。奇瑞的出口量越来越大，2003 年1200辆，2004年6018辆， 2005年1.8万辆，2006年5万辆（占中国汽车出口量的70%），2007年将达到10万辆。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;　奇瑞有着怎样的出口战略？ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“无内不稳，无外不强，以外促内，形式灵活”是奇瑞积极的走出去战略。比如2006年，全球汽车销售 4293万辆，国内销售284万辆，占6.6%，这说明93.4%的销量都在世界上，奇瑞正是看中了这一点，想尽快通过出口占领国际市场，因为那边抢一个点就不得了，就是好几百万。 <BR>　　“出口利润比国内高不少。”奇瑞的东方之子出口埃及和叙利亚，售价3.7万美元；瑞虎在俄罗斯的售价，高配置 2.2万美元，基本配置1.9万美元；QQ在俄罗斯的售价为7900美元，在埃及的售价甚至达到9000美元，均高过国内价格一倍左右。 <BR>　　另外，海外销售回款较快，一般在货到后的20天左右收到货款；而在国内市场，一般在6个月后才能收到销售款。显然，海外卖车能为企业带来不错的现金流，这对于资本短腿的民族汽车品牌来说，无疑具有极大诱惑，当然还有出口退税…… <BR>　　2006年11月28日，上海海通码头。工人们正在把一辆辆的汽车装进停泊在码头的“泰帝”号滚装轮上，20多天后，这一批次共200多辆的奇瑞轿车将会在埃及亚历山大港和叙利亚的塔科腊港被卸下，交付给当地的奇瑞经销商。 <BR>　　这仅仅是“泰帝”轮每月例行一次的上海——地中海航班而已。由于货源充足，从2006年起奇瑞汽车升级成为“泰帝”的钻石级客户，在每个月的月初或者月底，从日本或者韩国装船而来的“泰帝”轮都会为奇瑞汽车预留数百个车位，让奇瑞的QQ、风云、东方之子和丰田或者现代轿车一起运到万里之外的地中海。 <BR>&nbsp;&nbsp; <BR>　　从2001年出口叙利亚10辆汽车开始，奇瑞海外市场销售实现第一个1万辆，用了3年零6个月，第二个1 万辆用了7个多月，第三个1万辆用了6个月，第四个1万辆用了3个月，第五个1万辆用了1个多月。 <BR>　　“我们希望奇瑞汽车能开到美国去，开到曼哈顿大街，我们希望同中国的家电行业一样走出去……”这是尹同耀在2005年CCTV中国年度经济人物颁奖典礼上说的话。平日低调、谦逊的尹同耀在谈到汽车时，内心澎湃。 <BR>当晚，他的话让无数中国人激动不已。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;尾声：梦想照亮未来 </SPAN><BR><SPAN>奇瑞也成为了世界汽车工业史上发展最快的企业。 <BR>　　工程师出身、戴着眼镜、气质儒雅的尹同耀喜欢穿工作服，他的交谈同样也不加修饰，坦荡直白。在他眼中，奇瑞不是保时捷，不是法拉利。必须把量做上去，在各个车系上全线冲锋。“奇瑞一定要做一个进攻型企业。我非常希望先进攻，而不是防守反击，要不就不干，要干就拼命往前冲，义无反顾。”因为不上量就没前途，“不疯狂，就死亡！” <BR>　　即使是这样地努力，仍然无法消除尹同耀的危机感： “世界著名汽车企业在‘走’，而我们只有‘跑’才能追得上！骄傲和懈怠是奇瑞今天面临的危险。就像一辆汽车开到了180公里的时速，你才知道它哪里松动，哪里在响。盛誉之下，要清醒地感受奇瑞还存在很多短板。”现在，奇瑞已越来越清晰地感受到内部管理、盈利水准、资金运用等方面的不足。 <BR>&nbsp;&nbsp; <BR>　　“我们的努力程度还不如日本人和韩国人，我们拼命工作的人还不如日本和韩国多，这让我感到恐惧。汽车的产业链很长，只有整个产业链条的各个环节都努力拼搏，我们中国才能制造出高质量、低成本的汽车。” <BR>　　他还说：“面对公众时我很恐惧，很多企业比我们做得好，很多人比我们努力，我希望能把更多的精力和时间放到工作中去。”他常常说，“奇瑞太小了，太年轻了，奇瑞做得还很不够”。 <BR>　　在尹同耀眼里，奇瑞的成长只是马拉松的开始。</SPAN> <BR></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/2412355820100261333893</comments>
    <slash:comments>1</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/2412355820100261333893</guid>
    <pubDate>Tue, 26 Jan 2010 13:33:03 +0800</pubDate>
    <dcterms:modified>2010-01-29T09:19:56+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[桂林5日游--桂林高新杯软件设计大赛]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582009111444648707</link>
    <description><![CDATA[<div><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 上个星期，领导给我下达了一个任务：带学生参加桂林高新杯软件设计大赛。当时有些吃惊，之前有听说有同学去参加这次比赛，没想到他们居然经过两轮逃汰，在384支队伍中突出重围，最终以第3名的身份进入这次软件大赛的决赛------相当自豪！ 桂林市政府对这次比赛相当重视，所有参赛选手食宿全免，决赛获奖选手还有丰厚奖金可拿。以前也带过学生参加过一些比赛，第一次听说这样的事情。好几年没有出外面转转了，对于这个任务我欣然接受。</P>
<P>本次比赛的主页：<A href="http://soft.glbic.com/index.html">http://soft.glbic.com/index.html</A></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12月6日，我们一行四人踏上了征程，一路车马劳顿，来到了桂林师范大学。师大有好几个校区，组委会安排我们住在育才校区，这个是育才校区的旧门，新大门忘记拍了。</P>
<P><A href="http://img770.ph.126.net/ORnbryJQE9Plo69rLkDWrA==/1243556447108789815.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img770.ph.126.net/ORnbryJQE9Plo69rLkDWrA==/1243556447108789815.jpg"></A></P>
<P>这是师大图书馆，相当气派</P>
<P><A href="http://img623.ph.126.net/IixeG63z10JDFzFQ4KimaA==/1937392264700853741.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img623.ph.126.net/IixeG63z10JDFzFQ4KimaA==/1937392264700853741.jpg"></A><A href="http://img623.ph.126.net/-xICUQJ4Cv58ewb_ROg6uA==/1937392264700853728.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img623.ph.126.net/-xICUQJ4Cv58ewb_ROg6uA==/1937392264700853728.jpg"></A></P>
<P>这是我们入住的师大招待所，这5天时间，组委会的招待是相当地热情、周到，这里要对他们说声谢谢。</P>
<P>&nbsp;<A href="http://img615.ph.126.net/InIZvJ86FmE9yOFQkTgGzA==/1928103590469394838.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img615.ph.126.net/InIZvJ86FmE9yOFQkTgGzA==/1928103590469394838.jpg"></A></P>
<P>我跟一个同学住的房间，还不错，就是电视有点烂，这几个晚上我可是要靠电视度日啊。</P>
<P><A href="http://img66.ph.126.net/1oUa8hm1QUG9Ge_bUYDMXQ==/833447406041634537.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img66.ph.126.net/1oUa8hm1QUG9Ge_bUYDMXQ==/833447406041634537.jpg"></A></P>
<P>&nbsp;这次来桂林的另一个任务是做毕业生跟踪调查，我们系在桂林的学生不多，能联系到的的不到10个，其中还有一些专升本在师大或桂电读书的学生。晚上，找到几个之前我教过的毕业生一起在师大食堂吃了顿饭，三个年级的学生在一起，做些交流，谈谈感想，顺便做毕业生跟踪调查，呵呵，一举两得。相机忘记带了，这样的聚会以后很难再有了，有点可惜。</P>
<P>12月7日，我们来到决赛地点---桂林国家高新区创新大厦</P>
<P><A href="http://img153.ph.126.net/5rSYuaHFWw28cNtXFrtsdA==/3029796649314659005.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img153.ph.126.net/5rSYuaHFWw28cNtXFrtsdA==/3029796649314659005.jpg"></A></P>
<P>整个桂林高新区面积挺大，企业也不少。由于桂林是旅游城市，大家都知道桂林山水甲天下，重工业企业一般是不允许在这里落户的，市政府把发展的重点放在高科技企业上。创新大厦是一个孵化器，主要是帮助一些有创业梦想的人在这里发展，等具有相当规模后再从这里搬出去。</P>
<P>这是我们系参赛的三个帅哥</P>
<P><A href="http://img20.ph.126.net/hQKluvOHeUVxr2Q43rXjqw==/3160401038508540790.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img20.ph.126.net/hQKluvOHeUVxr2Q43rXjqw==/3160401038508540790.jpg"></A></P>
<P>我们来到四楼</P>
<P><A href="http://img.ph.126.net/9a8J5Wv44oUtLSlEzUlrnA==/3245406481474253875.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img.ph.126.net/9a8J5Wv44oUtLSlEzUlrnA==/3245406481474253875.jpg"></A></P>
<P>在比赛场地安装比赛时用的软件，比赛场在桂林安信软件有限公司内，他们和高新管委会一起负责这次比赛，这个公司是做对日外包软件的，总公司应该在日本，这里是为日本总公司培养和输送人才的基地。</P>
<P>我们的帅哥在安装比赛软件。</P>
<P><A href="http://img39.ph.126.net/nYz6K8rpgNjY_8V9nYcwSQ==/3147734664556986821.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img39.ph.126.net/nYz6K8rpgNjY_8V9nYcwSQ==/3147734664556986821.jpg"></A></P>
<P>&nbsp;把他们送到这里后，我就独自去做毕业生跟踪调查了，一日无事。</P>
<P>12月8日是比赛日，比赛从早上9点一直持续到第二天早上9点，共24个小时。吃住都在比赛场地内，太辛苦了。</P>
<P>我不能进入比赛场地，只能目送他们从这里进去，并送上祝福</P>
<P><A href="http://img843.ph.126.net/txm5aZSNbGGGMLIMzALY_w==/1869838270290435743.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img843.ph.126.net/txm5aZSNbGGGMLIMzALY_w==/1869838270290435743.jpg"></A></P>
<P>现在开始，我有了24个小时的私人时间，由于在桂林的毕业生不多，毕业跟踪调查很快做完，之后去找几个老同学，十几年不见，沧海桑田啊！蹭吃蹭喝是必须地！</P>
<P>12月9日早上，我来到赛场。比赛结束，帅哥扛着机箱到一楼做演示并答辩。24个小时不睡觉啊，辛苦了！这时我才知道比赛题目是一个程序员俱乐部管理系统，必须以B/S的方式完成。</P>
<P><A href="http://img170.ph.126.net/6C41w_CZqt0wCQYGhiXXSQ==/1598777867717538703.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img170.ph.126.net/6C41w_CZqt0wCQYGhiXXSQ==/1598777867717538703.jpg"></A></P>
<P>答辩赛场</P>
<P><A href="http://img169.ph.126.net/QRojFmY0NOqxd56tRkazaA==/1449596130061075620.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img169.ph.126.net/QRojFmY0NOqxd56tRkazaA==/1449596130061075620.jpg"></A></P>
<P>评委</P>
<P><A href="http://img169.ph.126.net/go5KXHDd8avTcfMmy_dh9A==/1449596130061075637.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img169.ph.126.net/go5KXHDd8avTcfMmy_dh9A==/1449596130061075637.jpg"></A></P>
<P>这是职业组第一名的选手在答辩，使用Flex技术完成比赛。果然是职业选手，有多年积累，这么短的时间内能完成如此效果，水平明显比其他队伍高出一截。其实场内所有人当时都应该清楚冠军非他们莫属了。</P>
<P><A href="http://img844.ph.126.net/N0E6WhDoL84tj61mRhPHJA==/890586826314070391.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img844.ph.126.net/N0E6WhDoL84tj61mRhPHJA==/890586826314070391.jpg"></A></P>
<P>这是我们学校的选手在演示。</P>
<P><A href="http://img.ph.126.net/adhDw30MngwjszrWgg63sw==/3244280581567411368.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img.ph.126.net/adhDw30MngwjszrWgg63sw==/3244280581567411368.jpg"></A></P>
<P>不得不承认，他们没有很好地完成比赛，效果不能令我满意，我总结了一下失败的原因：</P>
<P>1、积累不足，这么短的时间内要完成一个系统，需要大量的经验和积累，比如现成的模块改改就能套上。另外多层结构中的一些代码可以通过工具自动生成，他们没有相关经验和准备。说实话，我不喜欢这类自动生成的代码，毫无生命和美感，但软件就是朝着这个方向发展的，这也是规模化生产所必须的。当然，他们学习的时间还短，这一点是无法做到的。</P>
<P>2、对界面设计重视不足，漂亮的界面是成功的一半，这点大家很容易理解，美女人人都喜欢。当然界面设计不但要漂亮，还要讲究易用性。据他们说，最后一个小时才开始整界面，结果可想而知。</P>
<P>3、表达能力欠缺，一个程序做得再好，你不能用语言表达出来，别人是无法知道的。赛前我们几个老师还专门让他们试讲了一下，做了一点培训，但这种能力不是一天两天能培养出来的&nbsp;。这一点值得我们反思，以后要在教学中重视这一块，无论是书面表达还是语言表达能力。</P>
<P>其实拿不到奖很正常，别的学校大部分是本科院校，还有派研究生来参赛的。他们几个以前我教过，也看过他们写的程序，让我非常吃惊，可能数据库这块研究得还不够，没有展现出自己的水平非常遗憾。相信他们会有美好的未来。</P>
<P>4、缺少团队合作的经验，三个人没有共同开发过系统，合作起来自然有些吃力。</P>
<P>12月10日，组委会安排我们去桂林国际会展中心参观桂林创新创意文化节，我们的软件大赛也是这个节的一部分</P>
<P><A href="http://img237.ph.126.net/1nkVgMB52x3zwjbprBcJrg==/1372471986442350760.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img237.ph.126.net/1nkVgMB52x3zwjbprBcJrg==/1372471986442350760.jpg"></A></P>
<P>首先听北京大学王伟教授做报告，&nbsp;王伟教授是著名的动画前期设计艺术家，连环画艺术家和油画家，动画美术教育家。报告期间，看到了一些久违的画面------小时候看的连环画，让我很感动啊！我记得小时候我们看的连环画如西游记、三国演义等，那时我们称之为小人书。它们画面精美，内容引人入胜，后来再也买不到这样的连环画了，市场上到处充斥着日本连环画，要不就是一些色彩鲜艳，但画面却毫无艺术性可言，内容空洞的儿童图书。</P>
<P><A href="http://img120.ph.126.net/gww9fXPjag6rU2h5SuvzzA==/2001568559390826358.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img120.ph.126.net/gww9fXPjag6rU2h5SuvzzA==/2001568559390826358.jpg"></A></P>
<P>王伟教授在现场讲解如何给人体构图，用的是手写板。下次我要考虑买一块手写板来制作视频，超爽啊！</P>
<P><A href="http://img238.ph.126.net/3Re_J36jjO6-TK6aIpR7Ug==/1422011582343429580.jpg" target=_blank></A><A href="http://img847.ph.126.net/tv6SxarNTFLev7w7fuN8kQ==/2082633352683989382.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img847.ph.126.net/tv6SxarNTFLev7w7fuN8kQ==/2082633352683989382.jpg"></A></P>
<P>听完报告后来到楼下，看到几个古装人物在摆Pose<A href="http://img96.ph.126.net/10Ly0_OxaLp74pQ0vShpjA==/2043789805897811337.jpg" target=_blank></A></P>
<P><A href="http://img161.ph.126.net/j9vAmUJWCcNRQruz4o7M9Q==/2154690946721321866.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img161.ph.126.net/j9vAmUJWCcNRQruz4o7M9Q==/2154690946721321866.jpg"></A></P>
<P>&nbsp;</P>
<P style="TEXT-INDENT: 2em">接下来参观科技产业新城展览，这是美女导游</P>
<P style="TEXT-INDENT: 2em"><A href="http://img96.ph.126.net/10Ly0_OxaLp74pQ0vShpjA==/2043789805897811337.jpg"><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img96.ph.126.net/10Ly0_OxaLp74pQ0vShpjA==/2043789805897811337.jpg" border=0></A> </P>
<P style="TEXT-INDENT: 2em"><A href="http://img58.ph.126.net/bpF-puUWRDDk6flt6WUfdQ==/1833246523317970768.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img58.ph.126.net/bpF-puUWRDDk6flt6WUfdQ==/1833246523317970768.jpg"></A> </P>
<P style="TEXT-INDENT: 2em">这是另一个厅的美女导游 </P>
<P style="TEXT-INDENT: 2em"><A href="http://img161.ph.126.net/5ZSQsVkHdg88f9XU5aSONg==/1440588930806354208.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img161.ph.126.net/5ZSQsVkHdg88f9XU5aSONg==/1440588930806354208.jpg"></A></P>
<P style="TEXT-INDENT: 2em">这是无人机，高科技喔</P>
<P style="TEXT-INDENT: 2em"><A href="http://img161.ph.126.net/JiDCBGk_16GLn9WpkM8Fsg==/1440588930806354221.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img161.ph.126.net/JiDCBGk_16GLn9WpkM8Fsg==/1440588930806354221.jpg"></A></P>
<P style="TEXT-INDENT: 2em">高新区全景</P>
<P style="TEXT-INDENT: 2em"><A href="http://img.ph.126.net/DPARVzDKBR8wld1SXLcRmQ==/3308456876257447032.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img.ph.126.net/DPARVzDKBR8wld1SXLcRmQ==/3308456876257447032.jpg"></A></P>
<P style="TEXT-INDENT: 2em">参观完后回到大厅，发现演出正式开始，几个模特在摆酷</P>
<P style="TEXT-INDENT: 2em"><A href="http://img20.ph.126.net/RounJhD76k8zrbRjuaccvg==/3169971187717128777.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img20.ph.126.net/RounJhD76k8zrbRjuaccvg==/3169971187717128777.jpg"></A></P>
<P style="TEXT-INDENT: 2em">还有节目主持人</P>
<P style="TEXT-INDENT: 2em"><A href="http://img610.ph.126.net/JZlGIs3d0exwwqf_YDdd0Q==/1686035110498247202.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img610.ph.126.net/JZlGIs3d0exwwqf_YDdd0Q==/1686035110498247202.jpg"></A></P>
<P style="TEXT-INDENT: 2em">大厅有书画展，国粹，我喜欢</P>
<P style="TEXT-INDENT: 2em"><A href="http://img116.ph.126.net/9LP88FszcQ8boC1uHrIdsg==/710442841219218319.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img116.ph.126.net/9LP88FszcQ8boC1uHrIdsg==/710442841219218319.jpg"></A></P>
<P style="TEXT-INDENT: 2em">草书，我喜欢，就是有些字看不懂</P>
<P style="TEXT-INDENT: 2em"><A href="http://img767.ph.126.net/W8KKP7B8TPMGDhh_ZiO5Fg==/2933250732302890340.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img767.ph.126.net/W8KKP7B8TPMGDhh_ZiO5Fg==/2933250732302890340.jpg"></A></P>
<P style="TEXT-INDENT: 2em">水墨画是我最喜欢的，寥寥几笔，意境深远</P>
<P style="TEXT-INDENT: 2em"><A href="http://img242.ph.126.net/sYKoCZCUDLOssma_00sUWQ==/2135832123282101549.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img242.ph.126.net/sYKoCZCUDLOssma_00sUWQ==/2135832123282101549.jpg"></A></P>
<P style="TEXT-INDENT: 2em">接下来这个展厅是桂林动漫节</P>
<P style="TEXT-INDENT: 2em"><A href="http://img245.ph.126.net/3LD8QpeYh6w_BnYsjcRBHw==/2106558725703456342.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img245.ph.126.net/3LD8QpeYh6w_BnYsjcRBHw==/2106558725703456342.jpg"></A></P>
<P style="TEXT-INDENT: 2em">进去后大失所望，到处充斥着日韩、欧美风格的漫画。没有自己的民族风格，永远无法在世界占有一席之地。</P>
<P style="TEXT-INDENT: 2em">这些画大部分是学生画的，他们是看日本动画长大的，日本元素已经深入骨髓。</P><A href="http://img165.ph.126.net/3QedM84r9GDdPGcyQJzjTQ==/2255740463360451011.jpg" target=_blank></A><A href="http://img96.ph.126.net/OiyLEcXuln2wnkcShrVZVg==/725923964938290757.jpg" target=_blank></A><A href="http://img851.ph.126.net/4gwvmda06n6IiApjJHjFYw==/2715107625351529815.jpg" target=_blank></A><A href="http://img120.ph.126.net/ZwD68C9c6LdusMOoYkCqhQ==/2002131509344247674.jpg" target=_blank></A><A href="http://img246.ph.126.net/x-a-B2RnolGg67lMCjPPyw==/1457477429408906996.jpg" target=_blank></A><A href="http://img617.ph.126.net/Av1Op2vi1rk9UkoX-hy-SQ==/1905022642379112539.jpg" target=_blank></A>
<P style="TEXT-INDENT: 2em"><A href="http://img20.ph.126.net/qaxmEE17bLIKgNfH3RfRSw==/3170252662693839432.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img20.ph.126.net/qaxmEE17bLIKgNfH3RfRSw==/3170252662693839432.jpg"></A></P>
<P style="TEXT-INDENT: 2em">有着欧美灵魂的国产画</P>
<P style="TEXT-INDENT: 2em"><A href="http://img846.ph.126.net/7Ab0OWhpksBMPtwA-Xzxag==/752664087726207009.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img846.ph.126.net/7Ab0OWhpksBMPtwA-Xzxag==/752664087726207009.jpg"></A></P>
<P style="TEXT-INDENT: 2em">下面几张为数不多的拥有中国元素的东西，<A href="http://img162.ph.126.net/gTlNq_ZKW7IlNFM4bVgsWA==/2284450910984885564.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img162.ph.126.net/gTlNq_ZKW7IlNFM4bVgsWA==/2284450910984885564.jpg"></A><A href="http://img153.ph.126.net/dyuRa98vqHcaJ4WCkYerNg==/1642969439061342552.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img153.ph.126.net/dyuRa98vqHcaJ4WCkYerNg==/1642969439061342552.jpg"></A></P>
<P style="TEXT-INDENT: 2em">这样的画面真是久违了</P>
<P style="TEXT-INDENT: 2em"><A href="http://img165.ph.126.net/3QedM84r9GDdPGcyQJzjTQ==/2255740463360451011.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img165.ph.126.net/3QedM84r9GDdPGcyQJzjTQ==/2255740463360451011.jpg"></A></P>
<P style="TEXT-INDENT: 2em">剪纸，相当漂亮</P>
<P style="TEXT-INDENT: 2em"><A href="http://img851.ph.126.net/4gwvmda06n6IiApjJHjFYw==/2715107625351529815.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img851.ph.126.net/4gwvmda06n6IiApjJHjFYw==/2715107625351529815.jpg"></A><A href="http://img120.ph.126.net/ZwD68C9c6LdusMOoYkCqhQ==/2002131509344247674.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img120.ph.126.net/ZwD68C9c6LdusMOoYkCqhQ==/2002131509344247674.jpg"></A><A href="http://img246.ph.126.net/x-a-B2RnolGg67lMCjPPyw==/1457477429408906996.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img246.ph.126.net/x-a-B2RnolGg67lMCjPPyw==/1457477429408906996.jpg"></A></P>
<P style="TEXT-INDENT: 2em">居然还卖日本军刀</P>
<P style="TEXT-INDENT: 2em"><A href="http://img74.ph.126.net/sZAOR210WfRmDCq8M6Suvw==/1850979446851098660.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img74.ph.126.net/sZAOR210WfRmDCq8M6Suvw==/1850979446851098660.jpg"></A></P>
<P style="TEXT-INDENT: 2em">走出这个展馆，心情有些沉重</P>
<P style="TEXT-INDENT: 2em">出了会展中心，我们来到饭店，组委会请所有选手吃大餐，桂林菜，规格相当高，想着吃，忘了拍照，有点可惜。</P>
<P style="TEXT-INDENT: 2em"><A href="http://img.ph.126.net/sd4h7gJCTj4ZfKByNglT3Q==/3320278825279298747.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img.ph.126.net/sd4h7gJCTj4ZfKByNglT3Q==/3320278825279298747.jpg"></A></P>
<P style="TEXT-INDENT: 2em">吃完饭后，我们坐在大巴车上参观了整个高新区，然后回到创新大厦开座谈会，先是安信的屠博士介绍安信公司，给我感觉，他们公司对人才是相当重视的。</P>
<P style="TEXT-INDENT: 2em">接下来，选手们畅谈创业梦想，高新区会为选手提供创业机会和资金上的支持。</P>
<P style="TEXT-INDENT: 2em"><A href="http://img77.ph.126.net/AFPfu_8x211zjhlB0moFpA==/865535553386765619.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img77.ph.126.net/AFPfu_8x211zjhlB0moFpA==/865535553386765619.jpg"></A></P>
<P style="TEXT-INDENT: 2em">最后，我们参面了三楼的动漫基地，</P>
<P style="TEXT-INDENT: 2em"><A href="http://img124.ph.126.net/dAof4wlNTy5qb2IrYt5AlA==/1612570141576707444.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img124.ph.126.net/dAof4wlNTy5qb2IrYt5AlA==/1612570141576707444.jpg"></A></P>
<P style="TEXT-INDENT: 2em">参观完动漫基地，回到招待所吃饭，准备晚上的颁奖典礼</P>
<P style="TEXT-INDENT: 2em">晚上，所有选手西革履，来到会展中心参加盛大的颁奖晚会，晚会一共要颁5个奖，我们排在最后，看来是份量最重的比赛。</P>
<P style="TEXT-INDENT: 2em">这是我们坐的地方，第四排，非常靠前</P>
<P style="TEXT-INDENT: 2em"><A href="http://img846.ph.126.net/wSB4CCwfM2gEBY76sny6Zw==/753227037679563930.jpg"><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img846.ph.126.net/wSB4CCwfM2gEBY76sny6Zw==/753227037679563930.jpg" border=0></A></P>
<P style="TEXT-INDENT: 2em">晚会正式开始</P>
<P style="TEXT-INDENT: 2em"><A href="http://img100.ph.126.net/4Yb2QBxh0suDi06kHJKOdg==/741968038611120721.jpg"><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img100.ph.126.net/4Yb2QBxh0suDi06kHJKOdg==/741968038611120721.jpg" border=0></A></P>
<P style="TEXT-INDENT: 2em">主持人，相机不够高档，照相技术没有，我坐的位置非常编，所以照片效果不好，大家将就将就吧。</P>
<P style="TEXT-INDENT: 2em"><A href="http://img609.ph.126.net/qdyZukvdp5l4fnKlD2iRMw==/1896859868054554543.jpg" target=_blank></A><A href="http://img154.ph.126.net/DxL48s7XLcOQ0JuIDLxplQ==/2264184712661473915.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img154.ph.126.net/DxL48s7XLcOQ0JuIDLxplQ==/2264184712661473915.jpg"></A></P>
<P style="TEXT-INDENT: 2em">特约佳宾独舞，不错的说，在全国拿过奖</P>
<P style="TEXT-INDENT: 2em"><A href="http://img763.ph.126.net/U7FUkObC68YrLTGuWigo9A==/1205275850276137185.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img763.ph.126.net/U7FUkObC68YrLTGuWigo9A==/1205275850276137185.jpg"></A></P>
<P style="TEXT-INDENT: 2em">无伴奏合唱，本次晚会的大部份节目都是由广西师范大学音乐学院的学生表演的，很不错</P>
<P style="TEXT-INDENT: 2em"><A href="http://img623.ph.126.net/q8q77Com10dhW1WaSWKOgQ==/1681531510871035591.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img623.ph.126.net/q8q77Com10dhW1WaSWKOgQ==/1681531510871035591.jpg"></A></P>
<P style="TEXT-INDENT: 2em">这个是书画绘画大赛颁奖</P><A href="http://img692.ph.126.net/bg4PNuaQPXM-lbwGnUe61Q==/1169528528233823004.jpg" target=_blank></A>
<P style="TEXT-INDENT: 2em"><A href="http://img842.ph.126.net/TEFE2Gh-etLwzF3eKTlp2w==/1863645820802866822.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img842.ph.126.net/TEFE2Gh-etLwzF3eKTlp2w==/1863645820802866822.jpg"></A></P>
<P style="TEXT-INDENT: 2em">这个好象是房地产设计大奖</P>
<P style="TEXT-INDENT: 2em"><A href="http://img843.ph.126.net/dkV57oT-RIVN84sh4l40Mw==/885520276733289634.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img843.ph.126.net/dkV57oT-RIVN84sh4l40Mw==/885520276733289634.jpg"></A></P>
<P style="TEXT-INDENT: 2em">忘了是什么舞，只记得是师大学生表演的</P><A href="http://img623.ph.126.net/JysKaDNtY9vZDf84gfi8QA==/1944429139118927732.jpg" target=_blank></A>
<P style="TEXT-INDENT: 2em"><A href="http://img157.ph.126.net/Ti8badJnYHgPK-eCpSk5XQ==/2244199989315048491.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img157.ph.126.net/Ti8badJnYHgPK-eCpSk5XQ==/2244199989315048491.jpg"></A></P>
<P style="TEXT-INDENT: 2em">独舞，北京特邀佳宾</P>
<P style="TEXT-INDENT: 2em"><A href="http://img.ph.126.net/juS3PZ5Dz3zQRSLQJDgeng==/3318027025465600593.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img.ph.126.net/juS3PZ5Dz3zQRSLQJDgeng==/3318027025465600593.jpg"></A></P>
<P style="TEXT-INDENT: 2em">一干动漫人物在台上扭动</P>
<P style="TEXT-INDENT: 2em"><A href="http://img165.ph.126.net/cQcpO2gArwigJLiGZSYDZA==/2260244062988313191.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img165.ph.126.net/cQcpO2gArwigJLiGZSYDZA==/2260244062988313191.jpg"></A></P>
<P style="TEXT-INDENT: 2em">重头戏到了，职业组的学生组的个人一等奖颁奖，他们手上拿的牌子应该是去日本6日游的机票，中间是安信的美女董事长，一起吃饭的时候没看出来，汗！低调啊！</P>
<P style="TEXT-INDENT: 2em"><A href="http://img230.ph.126.net/K0u-hF_QtfScAjfxLa2Q0w==/2212956266900493446.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img230.ph.126.net/K0u-hF_QtfScAjfxLa2Q0w==/2212956266900493446.jpg"></A></P>
<P style="TEXT-INDENT: 2em">团队前三名，第一名手上拿的那个大纸板是2万块钱</P>
<P style="TEXT-INDENT: 2em"><A href="http://img116.ph.126.net/pBSmLnx7aBO3RicoW5dj_w==/711568741126152307.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img116.ph.126.net/pBSmLnx7aBO3RicoW5dj_w==/711568741126152307.jpg"></A></P>
<P style="TEXT-INDENT: 2em">晚会结束，所有演员上台谢幕</P>
<P style="TEXT-INDENT: 2em"><A href="http://img66.ph.126.net/uZM-puaJKVTDWGugHxMfeA==/835980680832100920.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img66.ph.126.net/uZM-puaJKVTDWGugHxMfeA==/835980680832100920.jpg"></A></P>
<P style="TEXT-INDENT: 2em">趁乱给我们的小伙子照张手拿奖状的像，顺便把美女主持人给照了进去。奖状上书最佳潜力奖</P>
<P style="TEXT-INDENT: 2em"><A href="http://img161.ph.126.net/O5gb8Q-nnlRLR0mzVr2kDA==/1446499905317787143.jpg" target=_blank><IMG title="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" alt="桂林5日游--桂林高新杯软件设计大赛 - 阿巴睇 - 阿巴睇的博客" src="http://img161.ph.126.net/O5gb8Q-nnlRLR0mzVr2kDA==/1446499905317787143.jpg"></A></P>
<P style="TEXT-INDENT: 2em">晚会结束后，坐大巴回到招待所，跟组委会工作人员一一道别，因为第二天一大早就要离一桂林。</P>
<P style="TEXT-INDENT: 2em">再次感谢他们的辛勤付出，使得本次活动圆满结束，也使得我们有宾至如归的感觉！</P>
<P style="TEXT-INDENT: 2em">感谢桂林高新区和我们学校的帅哥，使得我有机会目睹这次大赛，增长了见识，认识到差距。</P><A href="http://img.ph.126.net/juS3PZ5Dz3zQRSLQJDgeng==/3318027025465600593.jpg" target=_blank></A><A href="http://img846.ph.126.net/wSB4CCwfM2gEBY76sny6Zw==/753227037679563930.jpg"></A><A href="http://img100.ph.126.net/4Yb2QBxh0suDi06kHJKOdg==/741968038611120721.jpg"></A><A href="http://img846.ph.126.net/wSB4CCwfM2gEBY76sny6Zw==/753227037679563930.jpg" target=_blank></A><A href="http://img100.ph.126.net/4Yb2QBxh0suDi06kHJKOdg==/741968038611120721.jpg" target=_blank></A><A href="http://img846.ph.126.net/wSB4CCwfM2gEBY76sny6Zw==/753227037679563930.jpg" target=_blank></A><A href="http://img100.ph.126.net/4Yb2QBxh0suDi06kHJKOdg==/741968038611120721.jpg" target=_blank></A></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582009111444648707</comments>
    <slash:comments>7</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582009111444648707</guid>
    <pubDate>Mon, 14 Dec 2009 17:21:47 +0800</pubDate>
    <dcterms:modified>2009-12-15T09:27:40+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《数据结构(C#语言描述)》多媒体课件完全版]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/2412355820095290033230</link>
    <description><![CDATA[<div><P>这段时间比较忙，不过还是把所有PPT给做完了。最主要的还是制作了Hashtable的Silverlight动态演示程序，可到以下网址观看：<A href="http://www.cnblogs.com/abatei/archive/2009/06/23/1509790.html">http://www.cnblogs.com/abatei/archive/2009/06/23/1509790.html</A></P>
<P>KMP算法和排序这一章没有制作动画，得象我视频那样用手来演示，因为这些算法做起动画来太复杂，而且效果也不见得会比用手演示好。</P>
<P>总的来说这套PPT还是很强大的，里面大量使用了动画及演示程序，给授课老师省不少事。可到以下地址下载全套PPT</P>
<P><A href="http://pickup.mofile.com/9184950848373974">http://pickup.mofile.com/9184950848373974</A></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/2412355820095290033230</comments>
    <slash:comments>7</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/2412355820095290033230</guid>
    <pubDate>Mon, 29 Jun 2009 00:00:33 +0800</pubDate>
    <dcterms:modified>2009-06-29T00:04:21+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[重写俄罗斯方块]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582009514111726176</link>
    <description><![CDATA[<div><P>这段时间有机会使用俄罗斯方块授课，一直对之前所做的俄罗斯方块很不满意，所以这次并无使用之前的代码。</P>
<P>由于对于俄罗斯方块所使用的数据结构和算法已了然于胸，所以所有代码均在课堂上完成，这种以蜗牛速度写代码的方式感觉很不错。今天终于把一个最简单的俄罗斯方块完成， 看了下程序，我被雷倒了，一共只用了320行代码。大大出乎我的意料，第一个俄罗斯方块使用了2800行的代码，之前一直认为做个最简单的怎么也得800行以上的代码。呵呵，对比了一下之前的俄罗斯方块，突然发现第一版是那么地丑陋。</P>
<P>第二版俄罗斯方块使用和第一版相同的数据结构，算法方面只更改了消除满行算法，这个算法是一个O(n)算法，比之前的实现漂亮多了，睡觉的时候想出来的，呵呵。</P>
<P>第二版最大的改进是把所有复杂的不该用的东西全部去掉，简单就是美。这个程序对于刚学C#的同学来说还是比较适合的，使用了并不复杂的技术实现了一个游戏，强化了初学者对于循环、判断、数组等这些最基础知识的理解和使用。</P>
<P>下载地址：<A href="http://files.cnblogs.com/abatei/Tetris.rar">http://files.cnblogs.com/abatei/Tetris.rar</A></P>
<P>代码用VS2008打开过再发上去的，使用VS2005打开的方法是：新建一个新工程，在资源管理器中删掉相应文件，然后把新文件引入即可。</P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582009514111726176</comments>
    <slash:comments>23</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582009514111726176</guid>
    <pubDate>Sun, 14 Jun 2009 23:17:26 +0800</pubDate>
    <dcterms:modified>2009-06-15T07:19:37+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《C#程序设计基础教程与实训》已经重印，并修改了错误]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582009425111225468</link>
    <description><![CDATA[<div>今天从北大出版社收到了重印的《C#程序设计基础教程与实训》，勘误中所列的所有错误在重印后均已修改。之前这本书网上缺货，现在能买到的书应该是修改后的重印版本。</div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582009425111225468</comments>
    <slash:comments>13</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582009425111225468</guid>
    <pubDate>Mon, 25 May 2009 23:12:25 +0800</pubDate>
    <dcterms:modified>2009-05-25T23:12:25+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《数据结构（C#语言描述）》多媒体课件2-5章]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582009419114045621</link>
    <description><![CDATA[<div><P>第6章没做完,先传前5章上来供大家学习，并提出修改意见。</P>
<P>由于打算使用Silverlight做一个Hashtable动画，可能后面几章需要花较多时间。现在还没想好到底是弄像红黑树那样的动画（实在太痛苦了），还是只是做本书中Directionary那样的实时图形。不过肯定会在下个学期开学前弄完所有多媒体课件。</P>
<P>第4章KMP算法由于太复杂没有制作动画，教师需要像我在视频中讲课那样使用手制造动画，其实效果是一样的</P>
<P>下载地址：</P>
<P><A href="http://files.cnblogs.com/abatei/chapter2-5-ppt.rar">http://files.cnblogs.com/abatei/chapter2-5-ppt.rar</A></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582009419114045621</comments>
    <slash:comments>4</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582009419114045621</guid>
    <pubDate>Tue, 19 May 2009 23:40:45 +0800</pubDate>
    <dcterms:modified>2009-05-22T12:54:16+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《数据结构（C#语言描述）》多媒体课件(5月5日更新：第二章已完成)]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/2412355820094105310727</link>
    <description><![CDATA[<div><P>5月5日</P>
<P>今天终于把第2章的PPT制作完成，这一章可能是最复杂的了，完成真不容易。发上来给大家共享，在看书时配合PPT里的动画会更容易理解书本内容，最下方下载地址已更新。</P>
<P>5月1日</P>
<P>今天编辑打电话来，让我做新书的PPT。为了让使用这本书授课的教师能更舒服地授课，我决定亲自上阵，制作精美、强大的多媒体课件。</P>
<P>由于数据结构这门课的特殊性，我决定大量使用动画。之前做配套视频时已经制作了部分动画，但还远远不够。这次的工程十分浩大，今天我先做了第二章的一部分课件，发上来给大家提提意见。</P>
<P>下载地址：<A href="http://files.cnblogs.com/abatei/chapter2-5-ppt.rar">http://files.cnblogs.com/abatei/chapter2-5-ppt.rar</A></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/2412355820094105310727</comments>
    <slash:comments>7</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/2412355820094105310727</guid>
    <pubDate>Fri, 1 May 2009 00:53:10 +0800</pubDate>
    <dcterms:modified>2009-05-22T22:53:18+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《数据结构(C#语言描述)》勘误]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/24123558200932235141736</link>
    <description><![CDATA[<div><P>如发现本书的错误，请在这里留言</P>
<P><STRONG>1.&nbsp; P21页例2-1第22行代码</STRONG></P>
<P>Console.Write(i+"&nbsp; ");</P>
<P>改为:</P>
<P>Console.Write(<FONT color=#ff0000>arr[i]</FONT>+"&nbsp; ");</P>
<P><STRONG>2. P37页最后一段第一行</STRONG></P>
<P>C#中实现了双向链表的数据集合是泛型集合System</P>
<P>改为:</P>
<P>C#中实现了双向链表的数据<FONT color=#ff0000>结构</FONT>是泛型集合<FONT color=#ff0000>类</FONT>System</P>
<P><STRONG>3. P8页第一行</STRONG></P>
<P>3n+2&nbsp; 改为：3n+<FONT color=#ff0000>3</FONT></P>
<P><FONT color=#000000><STRONG>4. P8页第二自然段</STRONG></FONT></P>
<P>j=0执行1次，。。。。。。最后得出上述算法所包含的基本操作的次数是3n^2+3n+4。</P>
<P>改为：</P>
<P>j=0执行<FONT color=#ff0000>n</FONT>次，。。。。。。最后得出上述算法所包含的基本操作的次数是3n^2+3n+<FONT color=#ff0000>3</FONT>。</P>
<P><STRONG>5.P95页图5.13</STRONG></P>
<P>结点C旁边的D(1)改为<FONT color=#ff0000>C(1)</FONT></P>
<P><FONT color=#000000><STRONG>6.P115页23行</STRONG></FONT></P>
<P>DrawTree()方法使用深度优先遍历绘制二叉树</P>
<P>改为：</P>
<P>DrawTree()方法使用<FONT color=#ff0000>广</FONT>度优先遍历绘制二叉树</P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/24123558200932235141736</comments>
    <slash:comments>21</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/24123558200932235141736</guid>
    <pubDate>Wed, 22 Apr 2009 15:51:41 +0800</pubDate>
    <dcterms:modified>2009-08-06T22:22:35+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《数据结构 C#语言描述》的意见和建议]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/24123558200932235010101</link>
    <description><![CDATA[<div>关于本书，读者有何意见和建议，请在这里留言</div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/24123558200932235010101</comments>
    <slash:comments>15</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/24123558200932235010101</guid>
    <pubDate>Wed, 22 Apr 2009 15:50:10 +0800</pubDate>
    <dcterms:modified>2009-04-22T15:50:10+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《数据结构--C#语言描述》终于可在当当网购买到]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/24123558200931804112866</link>
    <description><![CDATA[<div><P>等了这么久，今天终于等到新书可以在当当网购买到了。因为这个星期光盘才出来，现在就能买到了，有点出乎我的意料。值得庆贺</P>
<P>在当当网买书免运费，并且可以送货上门，货到付款，有需要的读者可以在以下链接购买</P>
<P><A href="http://product.dangdang.com/product.aspx?product_id=20544747">http://product.dangdang.com/product.aspx?product_id=20544747</A></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/24123558200931804112866</comments>
    <slash:comments>16</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/24123558200931804112866</guid>
    <pubDate>Sat, 18 Apr 2009 00:41:12 +0800</pubDate>
    <dcterms:modified>2009-04-18T00:41:45+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《数据结构（C#语言描述）》目录]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582009213111918973</link>
    <description><![CDATA[<div><P style="MARGIN: 0cm 0cm 0pt 37.5pt; TEXT-INDENT: -37.5pt; mso-list: l1 level1 lfo1; tab-stops: list 37.5pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">先把这本书的目录发上来，样章等书出版后再发，另外之前也发布过一集二叉树的非递归遍历算法视频给大家试看，新的下载地址如下：</FONT></SPAN></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt 37.5pt; TEXT-INDENT: -37.5pt; mso-list: l1 level1 lfo1; tab-stops: list 37.5pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman"><FONT face=Arial><A href="http://www.fileupyours.com/files/219335/5-2.swf"></A><A href="http://www.fileupyours.com/files/219335/5-2.swf">http://www.fileupyours.com/files/219335/5-2.swf</A><A href="http://www.fileupyours.com/view/219335/5-2.swf" target=_blank><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman"><FONT face=Arial></FONT></FONT></SPAN></SPAN></A></FONT><A href="http://www.fileupyours.com/files/219335/5-2.swf"></A></FONT></SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 37.5pt; TEXT-INDENT: -37.5pt; mso-list: l1 level1 lfo1; tab-stops: list 37.5pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman"></FONT></SPAN></SPAN></B>&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt 37.5pt; TEXT-INDENT: -37.5pt; mso-list: l1 level1 lfo1; tab-stops: list 37.5pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">第1章<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">绪论</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">1.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">什么是数据结构</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level3 lfo2; tab-stops: list 36.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.1.1<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据结构的产生与发展</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level3 lfo2; tab-stops: list 36.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.1.2<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据和数据结构</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level3 lfo2; tab-stops: list 36.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.1.3<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据的逻辑结构</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level3 lfo2; tab-stops: list 36.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.1.4<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据的存储结构</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">1.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">算法与算法分析</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level3 lfo2; tab-stops: list 36.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.1.5<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">算法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level3 lfo2; tab-stops: list 36.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.1.6<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">算法设计的目标</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level3 lfo2; tab-stops: list 36.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.1.7<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">算法的时间复杂度</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 36pt; TEXT-INDENT: -18pt; mso-list: l0 level3 lfo2; tab-stops: list 36.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.1.8<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">算法的空间复杂度</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">1.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">1.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 37.5pt; TEXT-INDENT: -37.5pt; mso-list: l1 level1 lfo1; tab-stops: list 37.5pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">第2章<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">线性表</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">线性表的定义</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">线性表的顺序存储结构</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">---</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">顺序表</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">2.2.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">顺序表的特点</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">2.2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数组</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>2-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">2.2.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">剖析</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">System.Collections.ArrayList</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>2-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">2.2.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类型安全</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">线性表的链式存储结构</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">---</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">链表</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.3.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">单向链表</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>2-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.3.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">循环链表</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>2-4</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.3.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">双向链表</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>2-5</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实训指导：虚拟线性表</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>2-6</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">2.6 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"> </FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">第</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">3</FONT></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">章</SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face="Times New Roman">&nbsp; </FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">栈和队列</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">栈</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.1.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">栈的概念及操作</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.1.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">剖析</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">System.Collections.Stack</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>3-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.1.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">栈的应用</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>3-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.1.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">双向栈</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">队列</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.2.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">队列的概念及操作</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">循环队列</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.2.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">剖析</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">System.Collections.Queue</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>3-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实训指导：虚拟循环队列</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>3-4</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">3.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">第</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">4</FONT></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">章</SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face="Times New Roman">&nbsp; </FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">串</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">串的基本概念</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.2 String</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.3 System.Text.StringBuilder</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">串的模式匹配</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.4.1 Brute-Force</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">算法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>4-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.4.2 KMP</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">算法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>4-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>4-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.6 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实训指导：求最长公共子串</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>4-4</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">4.7 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">第</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">5</FONT></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">章</SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face="Times New Roman">&nbsp; </FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">树</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">树的基本概念</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.1.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">树的定义</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.1.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">树的表示</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.1.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">树的基本术语</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.2.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的基本概念</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的存储结构</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.3.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的深度优先遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>5-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.3.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的广度优先遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>5-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">线索二叉树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.4.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">线索二叉树的定义</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.4.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中序线索二叉树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>5-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">树和森林</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.5.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">树的存储结构</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.5.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">森林、树、二叉树的相互转换</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>5-4</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.6 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可绘制二叉树的设计</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.6.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的结点的位置关系</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.6.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接口设计</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.6.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树绘制类的设计</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.6.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实现可绘制二叉树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.7 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的画树算法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.7.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">满二叉树画法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>5-5</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.7.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">界内画法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.7.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最小面积画法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.8 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.9 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实训指导：虚拟二叉树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>5-6</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">5.10 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">第</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6</FONT></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">章</SPAN><FONT face="Times New Roman"> </FONT></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">基本概念和术语</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图的存储结构</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.2.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">邻接矩阵表示法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">邻接表表示法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图的遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.3.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">深度优先搜索遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.3.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">广度优先搜索遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.3.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">非连通图的遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">生成树和最小生成树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.4.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">生成树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.4.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最小生成树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.4.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">普里姆算法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>6-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.4.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">克鲁斯卡尔算法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>6-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最短路径</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.5.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">单源点最短路径</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>6-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.5.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所有顶点之间的最短路径</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>6-4</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.6 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.7 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实训指导：迷宫最短路径问题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>6-5</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">6.8 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">第</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">7</FONT></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">章</SPAN><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face="Times New Roman">&nbsp; </FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">查找</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">查找的基本概念</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">顺序查找</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二分查找</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.3.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二分查找的基本原理</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>7-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.3.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二分查找的算法实现</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.3.3 Array.BinarySearch</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.3.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">剖析</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">System.Collections.SortedList</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分块查找</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>7-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉查找树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.5.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉查找树的定义</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>7-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.5.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉查找树的查找</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.5.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉查找树的插入</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.5.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉查找树的删除</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.5.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉查找树的代码实现</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.6 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.7 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实训指导：</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Array.BinarySearch</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的使用</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">7.8 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42.75pt; TEXT-INDENT: -42.75pt; mso-list: l2 level1 lfo3; tab-stops: list 42.75pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">第8章<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">哈希表</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">概念引入</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">构造哈希函数的方法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.2.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">直接定址法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数字分析法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.2.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">除留余数法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">哈希冲突解决方法</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.3.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">闭散列法（开放地址法）</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.3.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开散列法（链地址法）</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">剖析</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">System.Collections.Hashtable</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>8-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.4.1 Hashtable</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的实现原理</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.4.2 Hashtable</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的代码实现</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">剖析</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Dictionary&lt;TKey, TValue&gt;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>8-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.5.1 Dictionary&lt;TKey, TValue&gt;</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类实现原理</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.5.2 Dictionary&lt;TKey, TValue&gt;</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的代码实现</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.6 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.7 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实训指导：虚拟哈希表</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>8-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">8.8 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42.75pt; TEXT-INDENT: -42.75pt; mso-list: l2 level1 lfo3; tab-stops: list 42.75pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">第9章<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">排序</SPAN><SPAN lang=EN-US></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">排序的基本概念</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">插入排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.2.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">直接插入排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>9-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">希尔排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>9-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">交换排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.3.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">冒泡排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>9-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.3.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">快速排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>9-4</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">选择排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.4.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">直接选择排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>9-5</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.4.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">堆排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>9-6</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">归并排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>9-7</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.5.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二路归并排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.75pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.5.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二路归并排序的实现</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.6 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章小结</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.7 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实训指导：使用</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">IComparer&lt;T&gt;</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接口进行排序</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>9-8</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">9.8 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">习题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42.75pt; TEXT-INDENT: -42.75pt; mso-list: l2 level1 lfo3; tab-stops: list 42.75pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">第10章<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">综合实训</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">---</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">八数码问题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">10.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">什么是八数码问题</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">10.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">八数码问题的解析</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>10-1</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.2.1 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从初始状态到达目标状态是否有解</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用什么方法求解八解码问题的最优解</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.2.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何避免重复访问一个状态</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.2.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">怎样记录查找路径</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.2.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用什么数据结构表示棋盘状态</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">10.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设计目标</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">10.4 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">界面设计</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>10-2</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">10.5 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代码编写</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 楷体_GB2312">视频<SPAN lang=EN-US>10-3</SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>10.5.1 MoveDirection.cs</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>10.5.2 AIResult.cs</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>10.5.3 HashHelpers.cs</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>10.5.4 SimpleDictionary.cs</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.5.5 NumSwitch.cs</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.5.6 IEightNumAI.cs</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.5.7 BFS_AI.cs</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><SPAN lang=EN-US><FONT face="Times New Roman">10.5.8 MainForm.cs</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">10.6 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">调试运行</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman">10.7 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">思考与改进</SPAN></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582009213111918973</comments>
    <slash:comments>6</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582009213111918973</guid>
    <pubDate>Fri, 13 Mar 2009 23:19:18 +0800</pubDate>
    <dcterms:modified>2009-03-14T00:04:07+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[今天收到《数据结构（C#语言描述）》样书]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/24123558200921310314460</link>
    <description><![CDATA[<div><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天下午收到北京大学出版社的快件，《数据结构（C#语言描述）》样书寄过来了。经过漫长的等待，这本书终于是印出来了，可惜的是还不能上市，因为光盘号还没下来，现在是有书没光盘。</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这是第二本书了，收到书时心情平静了许多，没有了当初的激动，呵呵，贴两张图出来庆祝一下。</P>
<P><A href="http://img.bimg.126.net/photo/3Knb0jQPUNFgp6I_MQCBbA==/2834734490453687531.jpg" target=_blank></A><A href="http://img.bimg.126.net/photo/h8FVrruBzpit_lLlrrAVKw==/2834734490453687532.jpg" target=_blank><IMG title="今天收到《数据结构（C语言描述）》样书 - 阿巴睇 - 阿巴睇的博客" alt="今天收到《数据结构（C语言描述）》样书 - 阿巴睇 - 阿巴睇的博客" src="http://img.bimg.126.net/photo/h8FVrruBzpit_lLlrrAVKw==/2834734490453687532.jpg"></A></P>
<P>&nbsp;</P>
<P><A href="http://img.bimg.126.net/photo/3Knb0jQPUNFgp6I_MQCBbA==/2834734490453687531.jpg" target=_blank><IMG title="今天收到《数据结构（C语言描述）》样书 - 阿巴睇 - 阿巴睇的博客" alt="今天收到《数据结构（C语言描述）》样书 - 阿巴睇 - 阿巴睇的博客" src="http://img.bimg.126.net/photo/3Knb0jQPUNFgp6I_MQCBbA==/2834734490453687531.jpg"></A></P>
<P>价格</P>
<P><A href="http://img.bimg.126.net/photo/-g11ifS51dXHiojX0YCyag==/3144919914788829745.jpg" target=_blank><IMG title="今天收到《数据结构（C语言描述）》样书 - 阿巴睇 - 阿巴睇的博客" alt="今天收到《数据结构（C语言描述）》样书 - 阿巴睇 - 阿巴睇的博客" src="http://img.bimg.126.net/photo/-g11ifS51dXHiojX0YCyag==/3144919914788829745.jpg"></A></P>
<P>《C#程序设计基础教程与实训》这本书的配套视频是书本的后续内容，而这本书的视频则完全配套本书使用。如下图，在何时观看哪一节视频，书本上都有明确指示。</P>
<P><A href="http://img.bimg.126.net/photo/KQf540ZSiTQ2edKlZt6maQ==/3981463545572696512.jpg" target=_blank><IMG title="今天收到《数据结构（C语言描述）》样书 - 阿巴睇 - 阿巴睇的博客" alt="今天收到《数据结构（C语言描述）》样书 - 阿巴睇 - 阿巴睇的博客" src="http://img.bimg.126.net/photo/KQf540ZSiTQ2edKlZt6maQ==/3981463545572696512.jpg"></A></P>
<P>之前曾经说过，AVL树和红黑树这两个内容由于是高职教材的缘故没有放到书中，这是个遗憾，不过我已经实现当初的诺言，将它们写在了博客里，请参照以下网址观看</P>
<P>AVL树：</P>
<P><A href="http://www.cnblogs.com/abatei/archive/2008/11/17/1335031.html">http://www.cnblogs.com/abatei/archive/2008/11/17/1335031.html</A></P>
<P>红黑树：</P>
<P><A href="http://www.cnblogs.com/abatei/archive/2008/12/17/1356565.html">http://www.cnblogs.com/abatei/archive/2008/12/17/1356565.html</A></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/24123558200921310314460</comments>
    <slash:comments>20</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/24123558200921310314460</guid>
    <pubDate>Fri, 13 Mar 2009 22:03:14 +0800</pubDate>
    <dcterms:modified>2009-03-13T23:10:34+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[C#与数据结构--树论--平衡二叉树(AVL Tree)]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582008101793150537</link>
    <description><![CDATA[<div><H2 style="MARGIN: 13pt 0cm"><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-no-proof: yes">介绍</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></H2>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">我们知道在二叉查找树中，如果插入元素的顺序接近有序，那么二叉查找树将退化为链表，从而导致二叉查找树的查找效率大为降低。如何使得二叉查找树无论在什么样情况下都能使它的形态最大限度地接近满二叉树以保证它的查找效率呢？</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">前苏联科学家</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">G.M. Adelson-Velskii </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman"> E.M. Landis</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">给出了答案。他们在</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1962</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">年发表的一篇名为</SPAN><SPAN style="mso-no-proof: yes"><FONT face="Times New Roman"> </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">《</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">An algorithm for the organization of information</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">》的文章中提出了一种自平衡二叉查找树（</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><A title="Self-balancing binary search tree" href="http://en.wikipedia.org/wiki/Self-balancing_binary_search_tree"><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none"><FONT face="Times New Roman">self-balancing binary search tree</FONT></SPAN></A></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">）。这种二叉查找树在插入和删除操作中，可以通过一系列的旋转操作来保持平衡，从而保证了二叉查找树的查找效率。最终这种二叉查找树以他们的名字命名为“</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL-Tree</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">”，它也被称为平衡二叉树（</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Balanced Binary Tree</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">）。这里所说的平衡使我们想到了中庸之道，但有句话说得好，“中不偏，庸不易”。学会这种平衡术是一个相当痛苦的过程。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H2 style="MARGIN: 13pt 0cm"><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial; mso-no-proof: yes">什么是平衡</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></H2>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">为了保证平衡，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树中的每个结点都有一个平衡因子（</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">balance factor</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，以下用</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">表示），它表示这个结点的左、右子树的高度差，也就是左子树的高度减去右子树的高度的结果值。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树上所有结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-bidi-font-family: 宋体">值</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">只能是</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">。反之，只要二叉树上一个结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的绝对值大于</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，则该二叉树就不是平衡二叉树。图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">演示了平衡二叉树和非平衡二叉树。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'"><A href="http://img.blog.163.com/photo/lKxnw4uWZt44Q7rAfzXx9g==/890868301290260700.jpg" target=_blank><IMG title="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" alt="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/lKxnw4uWZt44Q7rAfzXx9g==/890868301290260700.jpg"></A></SPAN></P><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树的构造</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如何构造一棵平衡二叉树呢？动态地调整二叉查找树平衡的方法为：每插入一个结点后，首先检查是否破坏了树的平衡性，如果因插入结点而破坏了二叉查找树的平衡，则找出离插入点最近的不平衡结点，然后将该不平衡结点为根的子树进行旋转操作，我们称该不平衡结点为旋转根，以该旋转根为根的子树称为最小不平衡子树。失衡状态可归纳为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">种，它们对应着</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">种旋转类型。下面使用了</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Flash</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">动画演示了这四种旋转类型，请确保你的电脑安装了</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Flash8.0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">以上版本的播放器，并且浏览器允许使用</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Flash</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">。做这几个动画纯属好玩，希望有一天可以使用</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Silverlight</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">做这些的动画。不过好象现在还没什么博客支持。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">型旋转</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P></EMBED>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'"></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P><EMBED allowScriptAccess="never" allowNetworking="internal" wmode="transparent" style="DISPLAY: block" pluginspage=http://www.macromedia.com/go/getflashplayer src=http://www.fileupyours.com/files/219335/LL%26%2322411%3B%26%2326059%3B%26%2336716%3B.swf width=350 height=300 type=application/x-shockwave-flash   wmode="transparent" quality="high"></EMBED>&nbsp;&nbsp; 
<P></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如以上动画所示，插入结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">后，结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，此时结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">为旋转根。这种插入结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的左孩子的左子树而导致失衡的情况需要进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转（</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">意为左左）。可以观察到，虽然结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">变为了</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，但最小不平衡子树在插入结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">前和旋转后的高度不变。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">型旋转</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'"></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><EMBED allowScriptAccess="never" allowNetworking="internal" wmode="transparent" style="DISPLAY: block" pluginspage=http://www.macromedia.com/go/getflashplayer src=http://www.fileupyours.com/files/219335/RR%26%2322411%3B%26%2326059%3B%26%2336716%3B.swf width=350 height=300 type=application/x-shockwave-flash   wmode="transparent" quality="high"></EMBED>&nbsp;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如以上动画所示，插入结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">90</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">后，结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，此时结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">为旋转根。这种插入结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的右孩子的右子树而导致失衡的情况需要进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转。最小不平衡子树在插入结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">90</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">前和旋转后的高度不变。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">型旋转</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><EMBED allowScriptAccess="never" allowNetworking="internal" wmode="transparent" style="DISPLAY: block" pluginspage=http://www.macromedia.com/go/getflashplayer src=http://www.fileupyours.com/files/219335/LR%28R%29%26%2322411%3B%26%2326059%3B%26%2336716%3B.swf width=350 height=300 type=application/x-shockwave-flash   wmode="transparent" quality="high"></EMBED>&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><EMBED allowScriptAccess="never" allowNetworking="internal" wmode="transparent" style="DISPLAY: block" pluginspage=http://www.macromedia.com/go/getflashplayer src=http://www.fileupyours.com/files/219335/LR%28L%29%26%2322411%3B%26%2326059%3B%26%2336716%3B.swf width=350 height=300 type=application/x-shockwave-flash   wmode="transparent" quality="high"></EMBED>&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">插入旋转根的左孩子的右子树而导致失衡的情况需要进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转。这里演示了</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LR(L)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LR(R) </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">两种情况。插入结点前和旋转后的最小不平衡子树高度不变。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">型旋转</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><EMBED allowScriptAccess="never" allowNetworking="internal" wmode="transparent" style="DISPLAY: block" pluginspage=http://www.macromedia.com/go/getflashplayer src=http://www.fileupyours.com/files/219335/RL%28L%29%26%2322411%3B%26%2326059%3B%26%2336716%3B.swf width=350 height=300 type=application/x-shockwave-flash   wmode="transparent" quality="high"></EMBED><EMBED allowScriptAccess="never" allowNetworking="internal" wmode="transparent" style="DISPLAY: block" pluginspage=http://www.macromedia.com/go/getflashplayer src=http://www.fileupyours.com/files/219335/RL%28R%29%26%2322411%3B%26%2326059%3B%26%2336716%3B.swf width=350 height=300 type=application/x-shockwave-flash   wmode="transparent" quality="high"></EMBED>&nbsp;&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">插入旋转根的右孩子的左子树而导致失衡的情况需要进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转。这里演示了</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RL(L)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RL(R) </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">两种情况。插入结点前和旋转后的最小不平衡子树高度不变。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">以上动画只演示了几种旋转类型的较复杂的情况，并没有全部演示，比如旋转根的左子树或右子树为空的情况，具体算法请参见稍后的代码。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树上结点的插入</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">算法的思想理解起来还是不太困难的，但如果真要使用代码实现就没那么简单了，它拥有超高的算法实现复杂度。我查了很多资料，大部分只给出主要算法代码，对于如何回溯修改</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值，如何处理不需要旋转的情况绝口不提，甚至对删除算法直接忽略。上网找资料，中文的，英文的全找了，大部分写代码不加注释，狂汗．．．．，实在看不下去。大部分代码使用递归算法，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">C#</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">实现更是少得可怜，在国外网站找到一个，但使用了三叉链表实现，多加了一个</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">parent</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">指针，总之无法找到让人满意的代码。最后一咬牙一跺脚，自己实现。最让人头痛的莫过于如何处理插入和删除后的回溯和修改</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值，庆幸的是最终还是按照我最初的想法比较漂亮地实现了</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树。优点是：无递归；无</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">parent</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">指针；插入和删除操作使用同一旋转方法，使代码更为简化。缺点是：为了兼顾效率，有些地方的处理比较特殊，代码很难完全读懂。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">下面对本算法做原理上的介绍：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 39pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">1、<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如何回溯修改祖先结点的平衡因子</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">我们知道，在</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树上插入一个新结点后，有可能导致其他结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值的改变，哪些结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值会被改变？如何计算新的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值呢？要解决这些问题，我们必须理解以下几个要点：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">只有根结点到插入结（橙色结点）点路径（称为插入路径）上的结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值会被改变。如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">所示，只有插入路径上结点（灰色结点）的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值被改变，其他非插入路径上结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值不变。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://img.blog.163.com/photo/YuYqlbAspHy5OiylNSUNow==/890868301290260701.jpg" target=_blank><IMG title="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" alt="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/YuYqlbAspHy5OiylNSUNow==/890868301290260701.jpg"></A></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">当一个结点插入到某个结点的左子树时，该结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值加</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">（如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">43</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">）；当一个结点插入到某个结点的右子树时，该结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值减</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">（如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">30</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">）。如何在程序中判断一个结点是插入到左子树还是右子树呢？很简单，根据二叉查找树的特性可以得出结论：如果插入结点小于某个结点，则必定是插入到这个结点的左子树中；如果如果插入结点大于某个结点，则必定插入到这个结点的右子树中。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">修改</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值的操作需从插入点开始向上回溯至根结点依次进行，当路径上某个结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值修改后变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，则修改停止。如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">3</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">所示，插入结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">30</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">后，首先由于</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">30&lt;43</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，将结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">43</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值加</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，使得结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">43</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman"> 1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">；接下来由于</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">30&gt;25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">改为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">；此时结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，停止回溯，不需要再修改插入路径上结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的平衡因子。道理很简单：当结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">或</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，表明高度小的子树添加了新结点，树的高度没有增加，所以不必修改祖先结点的平衡因子；当结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">或</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">时，表明原本等高左右子树由于一边变高而导致失衡，整棵子树的高度变高，所以必须向上修改祖先结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://img.blog.163.com/photo/vBHt3qKi8BqAm9Nh0MHvig==/890868301290260702.jpg" target=_blank><IMG title="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" alt="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/vBHt3qKi8BqAm9Nh0MHvig==/890868301290260702.jpg"></A></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt 39pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 39.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">1、<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">何时进行旋转操作？如何判断作什么类型的旋转？</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">在回溯修改祖先结点的平衡因子时，如果碰到某个结点的平衡因子变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">或</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，表明</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树失衡，这时需要以该结点为旋转根，对最小不平衡子树进行旋转操作。由于是从插入点开始回溯，所以最先碰到的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">或</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的结点必定为最小不平衡子树的根结点。如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">所示，插入</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">39</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">后，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">43</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">两个结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值都会变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，而必定先访问到结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">43</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，所以</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">43</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">是最小不平衡子树的根。根据以上</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Flash</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">动画演示所示，旋转操作完成后，最小不平衡子树插入结点前和旋转完成后的高度不变，所以可以得出结论：旋转操作完成后，无需再回溯修改祖先的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值。这样，图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">中的结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的平衡因子实际上在插入结点操作完成后的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值不变（对比图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">）。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://img.blog.163.com/photo/kUdj0NQZ1Ht2ZGqZGYXO2A==/3987655995060883157.jpg" target=_blank><IMG title="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" alt="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/kUdj0NQZ1Ht2ZGqZGYXO2A==/3987655995060883157.jpg"></A></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">可以通过旋转根及其孩子的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值来决定作什么类型的旋转操作：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">当旋转根的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">时：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 42pt; mso-char-indent-count: 4.0; mso-para-margin-left: 2.0gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如果旋转根的左孩子的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，则进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">型旋转；</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 42pt; mso-char-indent-count: 4.0; mso-para-margin-left: 2.0gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如果旋转根的左孩子的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，则进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">型旋转。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">当旋转根的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">时：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 42pt; mso-char-indent-count: 4.0; mso-para-margin-left: 2.0gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如果旋转根的右孩子的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，则进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">型旋转；</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 21pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 42pt; mso-char-indent-count: 4.0; mso-para-margin-left: 2.0gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如果旋转根的右孩子的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，则进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">型旋转。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">可通过观察之前的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Flash</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">动画检验以上结论。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 39pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">1、<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如何保存插入路径？</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">可以使用栈来保存插入路径上的各个结点，但由于栈是由数组抽象而来，为了进一步加快</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树的运行速度，我直接使用数组存放插入路径，这样可以减少方法的调用，尽量避免一些不必要的操作。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如果实现</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树实现索引器，而在索引器中使用</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">int32</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，那么</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树元素的长度不会超过一个</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">32</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">位整数的最大值。一个深度为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">32</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的满二叉树可以存放结点数为：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">2^32-1=4294967295</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，这个值已经远远超出</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">32</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">位的整数范围，所以我将数组的长度定为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">32</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">。这样就不必如</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">ArrayList</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">那样进行扩容操作了。另外本程序还使用了一个成员变量</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">p</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">用于指示当前访问结点，由于</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">p</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">指针的存在可以不必在每次进行插入和删除操作后清空数组中的元素，进一步增加了</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树的运行速度。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">使用数组的另一个好处是可以随时访问旋转根的双亲结点，以方便进行旋转操作时修改根结点。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树上结点的删除</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树的删除操作与插入操作有许多相似之处，它的大体步骤如下：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">⑴用二叉查找树的删除算法找到并删除结点（这里简称为删除点）；</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">⑵沿删除点向上回溯，必要时，修改祖先结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值；</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">⑶回溯途中，一旦发现某个祖先的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值失衡，如插入操作那样旋转不平衡子树使之变为平衡，跟插入操作不同的是，旋转完成后，回溯不能停止，也就是说在</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树上删除一个结点有可能引起多次旋转。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树上的删除和插入操作虽然大体相似，但还是有一些不同之处，大家需要注意以下几点：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 39pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo3; tab-stops: list 39.0pt"><SPAN lang=EN-US style="mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">1、<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp; </SPAN></FONT></SPAN></SPAN><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">回溯方式的不同</SPAN></B><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">在删除结点的回溯过程中，当某个结点的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">或</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">时，则停止回溯。这一点同插入操作正好相反，因为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">或</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，表明原本平衡的子树由于某个结点的删除导致了不平衡，子树的总体高度不变，所以不再需要向上回溯。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 39pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo3; tab-stops: list 39.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">2、<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转方式的不同</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">所示：删除</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树中的结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">25</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">导致结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值由原来的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">变为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">-2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，但旋转根</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">50</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的右孩子的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，这种情况在前面所讲的旋转操作中并不存在，那么是需要对它进行</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转还是</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转呢？正确方法是使用</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">RR</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转，所不同之处是旋转后的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值不同，需要单独处理。需要注意，这种情况在插入操作时不可能发生，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">LL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">旋转也存在类型的情况。另外旋转完成后树的整体高度没有改变，所以大部分情况下旋转操作完成后，子树的高度降低，需要继续向上回溯修改祖先的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值，而只有这种情况由于子树的高度未改变，所以停止回溯。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://img.blog.163.com/photo/I19BG2T1t89CmSMKbYFHFA==/890868301290260704.jpg" target=_blank></A></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://img.blog.163.com/photo/BmmqqXY_HMw1HRBldxA8Sg==/856528354131671900.jpg" target=_blank></A><A href="http://img.blog.163.com/photo/BWMeVh7eaHLc7FGcxazIkg==/1137440380889072522.jpg" target=_blank><IMG title="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" alt="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/BWMeVh7eaHLc7FGcxazIkg==/1137440380889072522.jpg"></A>&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt 39pt; VERTICAL-ALIGN: middle; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 39.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">3、<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">删除点的选择特例</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">在二叉查找树中，我们知道当删除点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">p</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">既有左子树，又有右子树，此时可以令</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">p</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">的中序遍历直接前驱结点代替</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">p</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，然后再从二叉查找树中删除它的直接前驱。如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">7.13</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">所示，结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">既有左子树，又有右子树，它的直接前驱结点为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">。在删除结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">时，首先用结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">代替结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">，然后再删除结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">完成删除操作。这里需要注意的是此时必须将删除前的结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">4</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">作为删除点来进行向上回溯操作，而不是结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://img.blog.163.com/photo/nKqmRMzdgKR39vQsxweBQQ==/890868301290260705.jpg" target=_blank><IMG title="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" alt="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/nKqmRMzdgKR39vQsxweBQQ==/890868301290260705.jpg"></A></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">&nbsp;</P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树的代码实现</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">这里没有给出</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树的泛型实现，它只存放整数。因为如果使用泛型实现并按照微软惯例，使用键</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">/</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">值对实现，那么代码真的就很难读懂了。以这个代码为基础，改为泛型实现是很容易的事。另外</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">C#</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">中没</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">树的实现，而实现了红黑树，说明红黑树更有效率，所以也不必将</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AVL</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">泛型化，代码忽略了部分出错可能。红黑树将在后面讲解。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">public class BinarySearchTree : IBinaryTree //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">实现画树接口</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">{<SPAN style="mso-tab-count: 1">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">成员变量</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private Node _head; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">头指针</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private Node[] path = new Node[32]; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">记录访问路径上的结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private int p; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">表示当前访问到的结点在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">_path</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">上的索引</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>INode IBinaryTree.Head //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">显式接口实现</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;</SPAN>get { return (INode)_head; }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">public bool Add(int value) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">添加一个元素</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果是空树，则新结点成为二叉排序树的根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (_head == null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>_head = new Node(value);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>_head.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return true;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>p = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>//prev</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为上一次访问的结点，</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">current</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为当前访问结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node prev = null, current = _head;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (current != null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[p++] = current; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">将路径上的结点插入数组</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果插入值已存在，则插入失败</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (current.Da<wbr>ta == value)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>return false;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>prev = current;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当插入值小于当前结点，则继续访问左子树，否则访问右子树</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>current = (value &lt; prev.Da<wbr>ta) ? prev.Left : prev.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>current = new Node(value); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">创建新结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>current.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>if (value &lt; prev.Da<wbr>ta) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果插入值小于双亲结点的值</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>prev.Left = current; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">成为左孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果插入值大于双亲结点的值</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>prev.Right = current; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">成为右孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[p] = current; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">将新元素插入数组</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">path</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">的最后</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">修改插入点至根结点路径上各结点的平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>int bf = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (p &gt; 0)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//bf</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">表示平衡因子的改变量，当新结点插入左子树，则平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">+1</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当新结点插入右子树，则平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">-1</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bf = (value &lt; path[p - 1].Da<wbr>ta) ? 1 : -1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[--p].BF += bf; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">改变当父结点的平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bf = path[p].BF; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">获取当前结点的平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">判断当前结点平衡因子，如果为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">0</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">表示该子树已平衡，不需再回溯</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">而改变祖先结点平衡因子，此时添加成功，直接返回</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (bf == 0)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return true;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else if (bf == 2 || bf == -2) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">需要旋转的情况</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>RotateSubTree(bf);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return true;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return true;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">删除指定值</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>public bool Remove(int value) </SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>p = -1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//parent</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">表示双亲结点，</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">node</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">表示当前结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node node = _head;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">寻找指定值所在的结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (node != null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[++p] = node;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果找到，则调用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">RemoveNode</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">方法删除结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (value == node.Da<wbr>ta)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>RemoveNode(node);//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">现在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">p</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">指向被删除结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return true; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">返回</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">true</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">表示删除成功</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (value &lt; node.Da<wbr>ta)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果删除值小于当前结点，则向左子树继续寻找</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>node = node.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果删除值大于当前结点，则向右子树继续寻找</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>node = node.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return false; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">返回</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">false</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">表示删除失败</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">删除指定结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private void RemoveNode(Node node)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node tmp = null;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当被删除结点存在左右子树时</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (node.Left != null &amp;&amp; node.Right != null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tmp = node.Left; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">获取左子树</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[++p] = tmp;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (tmp.Right != null) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">获取</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">node</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">的中序遍历前驱结点，并存放于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">tmp</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">中</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">找到左子树中的最右下结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tmp = tmp.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[++p] = tmp;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">用中序遍历前驱结点的值代替被删除结点的值</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>node.Da<wbr>ta = tmp.Da<wbr>ta;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (path[p - 1] == node)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[p - 1].Left = tmp.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[p - 1].Right = tmp.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当只有左子树或右子树或为叶子结点时</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">首先找到惟一的孩子结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tmp = node.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (tmp == null) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果只有右孩子或没孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tmp = node.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (p &gt; 0)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (path[p - 1].Left == node)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果被删结点是左孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[p - 1].Left = tmp;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果被删结点是右孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[p - 1].Right = tmp;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当删除的是根结点时</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>_head = tmp;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">删除完后进行旋转，现在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">p</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">指向实际被删除的结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>int da<wbr>ta = node.Da<wbr>ta;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (p &gt; 0)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//bf</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">表示平衡因子的改变量，当删除的是左子树中的结点时，平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">-1</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当删除的是右子树的孩子时，平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">+1</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>int bf = (da<wbr>ta &lt;= path[p - 1].Da<wbr>ta) ? -1 : 1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[--p].BF += bf; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">改变当父结点的平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bf = path[p].BF; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">获取当前结点的平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (bf != 0) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">bf==0</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">，表明高度降低，继续后上回溯</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">bf</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">1</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">或</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">-1</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">则说明高度未变，停止回溯，如果为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">2</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">或</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">-2</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">，则进行旋转</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当旋转后高度不变，则停止回溯</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>if (bf == 1 || bf == -1 || !RotateSubTree(bf))</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>break;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">旋转以</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">root</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为根的子树，当高度改变，则返回</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">true</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">；高度未变则返回</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">false</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private bool RotateSubTree(int bf) </SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bool tallChange = true;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node root = path[p], newRoot = null;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (bf == 2) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当平衡因子为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">2</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">时需要进行旋转操作</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>int leftBF = root.Left.BF;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (leftBF == -1) //LR</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">型旋转</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot = LR(root);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else if (leftBF == 1)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot = LL(root); //LL</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">型旋转</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当旋转根左孩子的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">bf</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">0</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">时，只有删除时才会出现</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot = LL(root);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tallChange = false;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (bf == -2) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当平衡因子为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">-2</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">时需要进行旋转操作</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>int rightBF = root.Right.BF; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">获取旋转根右孩子的平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (rightBF == 1) </SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot = RL(root); //RL</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">型旋转</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else if (rightBF == -1)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot = RR(root); //RR</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">型旋转</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">当旋转根左孩子的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">bf</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">0</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">时，只有删除时才会出现</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot = RR(root);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tallChange = false;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">更改新的子树根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (p &gt; 0)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (root.Da<wbr>ta &lt; path[p - 1].Da<wbr>ta)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[p - 1].Left = newRoot;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>path[p - 1].Right = newRoot;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>_head = newRoot; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">如果旋转根为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">AVL</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">树的根，则指定新</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">AVL</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">树根结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return tallChange;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>//root</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为旋转根，</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">rootPrev</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为旋转根双亲结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private Node LL(Node root) //LL</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">型旋转，返回旋转后的新子树根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node rootNext = root.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.Left = rootNext.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.Right = root;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (rootNext.BF == 1)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else //rootNext.BF==0</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">的情况，删除时用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = 1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = -1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return rootNext; //rootNext</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为新子树的根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private Node LR(Node root) //LR</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">型旋转，返回旋转后的新子树根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node rootNext = root.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node newRoot = rootNext.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.Left = newRoot.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.Right = newRoot.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot.Left = rootNext;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot.Right = root;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>switch (newRoot.BF) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">改变平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>case 0:</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>break;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>case 1:</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = -1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>rootNext.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>break;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>case -1:</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = 1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>break;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return newRoot; //newRoot</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为新子树的根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private Node RR(Node root) //RR</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">型旋转，返回旋转后的新子树根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node rootNext = root.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.Right = rootNext.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.Left = root;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (rootNext.BF == -1)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>else //rootNext.BF==0</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">的情况，删除时用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = -1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = 1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return rootNext; //rootNext</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为新子树的根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>private Node RL(Node root) //RL</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">型旋转，返回旋转后的新子树根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node rootNext = root.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node newRoot = rootNext.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.Right = newRoot.Left;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.Left = newRoot.Right;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot.Right = rootNext;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot.Left = root;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>switch (newRoot.BF) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">改变平衡因子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>case 0:</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>break;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>case 1:</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = -1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>break;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>case -1:</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>root.BF = 1;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rootNext.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>break;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newRoot.BF = 0;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return newRoot; //newRoot</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-no-proof: yes; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">为新子树的根</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; VERTICAL-ALIGN: middle; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">运行效果如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">7</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-no-proof: yes; mso-hansi-font-family: 'Times New Roman'">所示：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://img.blog.163.com/photo/vipDEMl3WEiO1RZAQgakSQ==/2607302709271799047.jpg" target=_blank><IMG title="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" alt="C与数据结构--树论--平衡二叉树(AVL Tree) - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/vipDEMl3WEiO1RZAQgakSQ==/2607302709271799047.jpg"></A></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">&nbsp;</P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">动态演示程序下载地址：</P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://files.cnblogs.com/abatei/AVLTree.rar">http://files.cnblogs.com/abatei/AVLTree.rar</A></P></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582008101793150537</comments>
    <slash:comments>8</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582008101793150537</guid>
    <pubDate>Mon, 17 Nov 2008 09:31:50 +0800</pubDate>
    <dcterms:modified>2009-10-14T23:42:42+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[二叉树遍历非递归算法视频]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582008108101513246</link>
    <description><![CDATA[<div><P>这个视频是配套在《数据结构(C#语言描述)》这本书里的一节视频。一共讲解了五个算法：</P>
<P>1、二叉树先序遍历非递归算法</P>
<P>2、二叉树中序遍历非递归算法</P>
<P>3、三种二叉树后序遍历非递归算法</P>
<P style="TEXT-INDENT: 2em">视频下载地址1：<A href="http://bbs.langsin.com/thread-9917-1-1.html">http://bbs.langsin.com/thread-9917-1-1.html</A>
</P><P style="TEXT-INDENT: 2em">视频下载地址2：<A href="http://www.namipan.com/d/%e4%ba%8c%e5%8f%89%e6%a0%91%e9%81%8d%e5%8e%86%e9%9d%9e%e9%80%92%e5%bd%92%e7%ae%97%e6%b3%95.rar/75cce7b0cecef818f1eee8c31ba8cb132cb84fe05e4b7301">http://www.namipan.com/d/%e4%ba%8c%e5%8f%89%e6%a0%91%e9%81%8d%e5%8e%86%e9%9d%9e%e9%80%92%e5%bd%92%e7%ae%97%e6%b3%95.rar/75cce7b0cecef818f1eee8c31ba8cb132cb84fe05e4b7301</A>
</P><P>视频大小：25M；时长：67分钟。其中，后序遍历的非递归算法一直都是难点，所以这里共介绍了三种算法，供大家对比和参考。通过观看视频可以更进一步地了解队列、栈和二叉树。</P>
<P>先导课程可以看这里：</P>
<P><A href="http://cgbluesky.blog.163.com/blog/static/24123558200842311354144/edit/">http://cgbluesky.blog.163.com/blog/static/24123558200842311354144/edit/</A></P>
<P>之前写这篇博客时，有人曾留言说使用递归进行遍历效率太低，所以制作了这个视频让大家了解非递归算法的实现。也希望大家提出意见，看看这样学习数据结构是否会更容易些。</P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582008108101513246</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582008108101513246</guid>
    <pubDate>Sat, 8 Nov 2008 22:15:13 +0800</pubDate>
    <dcterms:modified>2008-11-08T23:10:51+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[新书预告---《数据结构--C#语言描述》]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582008910115555901</link>
    <description><![CDATA[<div><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天终于把《数据结构--C#语言描述》的全稿发给出版社了，出版社还是北京大学出版社，书还是21世纪高职高专系列。书中配套视频也已完成。忙了很长一段时间，终于可以安逸地坐下来再写写博客了。我喜欢那种休闲的生活，高兴的时候坐下来听听歌，看看书。但回想一下却发现这两年过得很紧张，两年两本书，近100集的视频，业余时间几乎都用在这上面了。不过还好，以后又可以享受休闲生活了。<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这本书在《C#程序设计基础教程与实训》还没出版时我就已经在构思了。在我的构想中，认为程序设计的学习最少应该经过三个基础阶段：基础语法→面向对象→数据结构，为什么要学习数据结构呢？因为它可以让你站在更高的层次去看待程序；它可以让我们领略先辈大师们的思想精髓。只有基础打牢了，后面进行深入地学习才会得心应手。当初一直想上数据结构这门课，但数据结构教材不少，都是用C或C++写的，有少量用Java描述，就是没看见有用C#写的数据结构书籍。C#也出来不少年了，市面上C#的书籍也有上千本了，但国内居然没有一本用C#描述数据结构的书籍，实在有些想不通。总不能为了上数据结构而多开一门C语言的课程吧（时至今日，我还是认为C语言是最好的入门语言，它可以让你排除一切杂念，专心于程序逻辑及思想。但它的缺点是没有可视化编程，无法吸引学生眼球。以前我们学校开过这门课，但最终还是放弃了。）没办法，只有自已动手，丰衣足食。现在这三个阶段的课程已经差不多完成了，面向对象这个阶段没有成书，因为高职对于基础并不太重视，时间也不允许，只能将它以视频的方式供学生自学了。当然，这一块还没做完，以后慢慢再完成吧。<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 没写书之前一直怀疑使用C#表述数据结构是否合适，必竟一般情况下它不能直接对内存进行操作。但随着写书的不断深入，这种顾虑完全被打消了，C#是如此优美，简洁，它同样可以完美地展现数据结构的内涵。写书过程中参考了不少数据结构方面的书籍，国内的，国外的，感受是国内这方面的书籍更系统、清晰，表述详细合理，外国的月亮并不一定全比中国的圆。当然代码就没得参考了，幸而C#类库中实现了很多数据结构，而且都写得非常漂亮，就是没有注释，读起来有些困难。<BR>&nbsp;&nbsp;&nbsp; 我这本书跟其他的数据结构书籍还是有那么一点点不同的：<BR>1、尽量减少数学公式<BR>&nbsp;&nbsp;&nbsp; 当然不是完全抛弃，一些简单的数学公式还是有的，这样做的目的是降低学习数据结构的门槛。看看《算法导论》里的数学公式，这会使很多人没开始学习就已经害怕了，它并不适合高职学生。数学可以精确地描述数据结构，但很多东西不用数学公式一样可以表达，相对于数学来说，思想更加重要，数学不好并不意味着做不了程序员。我们的培养目标是技能型人才，研究工作还是留给研究生和博士吧。</P>
<P>2、抛弃伪代码<BR>&nbsp;&nbsp;&nbsp; 伪代码可以简单明了地表述数据结构逻辑，但我更喜欢可运行的代码，它可以让你看到实实在在的结果，也可以通过断点调试、单步运行、修改参数等方式查看数据变化，更进一步地了解数据结构。本书的所有代码均为可运行代码，并且秉承了第一本书的风格，对所有代码进行了详细的注释。</P>
<P>3、配套视频教程<BR>&nbsp;&nbsp;&nbsp; 很多人可能感觉数据结构是一门比较难学的课程，但我在这么多年的教学过程中发现，讲算法比讲代码容易多了，只要使用动画的方式演示数据的移动过程再配以一定的讲解，大部份人都可以很轻松地理解算法的思想。 但仅限于思想，至于如何把思想转化为代码我就无能为力了，这只能靠自己。网上有很多数据结构的动画和视频，但动画不配套讲解，很少视频去演示数据的演变过程，难于让人理解。本书的配套视频主要通过动画讲解各数据结构和算法的运算过程，并不讲解代码，所以对于使用其他语言学习数据结构的人也会有一定的帮助。为了能更好地讲解数据结构，我制作了不少动画和程序，很辛苦，贴几个有代表性的出来。</P>
<P>这个是循环队列：</P>
<P><A href="http://img.blog.163.com/photo/YjQQ903UYcdLng99hON_2Q==/2582532911321151315.jpg" target=_blank><IMG title="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" alt="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/YjQQ903UYcdLng99hON_2Q==/2582532911321151315.jpg"></A></P>
<P>这个是二叉树，设计这个最小面积画树算法花了我不少时间，抓破头皮，几乎绝望的时候突然灵光一闪。。。。。。</P>
<P>本书也介绍了三种画树算法，学习它们对于理解二叉树的本质有很大的帮助。</P>
<P><A href="http://img.blog.163.com/photo/7upYRriTwpbL2eq0e6Azaw==/3731795241230600647.jpg" target=_blank><IMG title="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" alt="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/7upYRriTwpbL2eq0e6Azaw==/3731795241230600647.jpg"></A></P>
<P>这个是迷宫问题最短路径算法的PowerPoint动画</P>
<P><A href="http://img.blog.163.com/photo/jo2i5xYixYuPmEkyblPUnA==/4298122894372593483.jpg" target=_blank><IMG title="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" alt="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/jo2i5xYixYuPmEkyblPUnA==/4298122894372593483.jpg"></A></P>
<P>这是迷宫问题最短路径程序：</P>
<P>&nbsp;<A href="http://img.blog.163.com/photo/BuOVLpMlDFTGYmNRUFaohw==/331577522565875637.jpg" target=_blank><IMG title="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" alt="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/BuOVLpMlDFTGYmNRUFaohw==/331577522565875637.jpg"></A></P>
<P>4、深入C#类库进行介绍</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C#集合类中实现了很多的数据结构，如果对这些集合类没有深刻的理解，是很难写好程序的。本书抽取了C#中一些常用的集合类，并对核心源码进行了分析。</P>
<P>5、配套完整实验指导和实训指导</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp; 这给教师授课省了很多事，实训项目选择了八数码问题，大家还记得第一本书中的拼数字游戏和拼图游戏吧？这个项目就是用电脑求解解题步骤的。使用它还是比较合适的，使用了本书所介绍的很多数据结构。</P>
<P><A href="http://img.blog.163.com/photo/B3Mho3twm6DTMpLC92PkbQ==/5401786278055345051.jpg" target=_blank><IMG title="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" alt="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/B3Mho3twm6DTMpLC92PkbQ==/5401786278055345051.jpg"></A></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 下面来介绍写书过程中给我留下最深刻印刻的两种数据结构和算法，一个就是KMP算法，一个伟大的算法，个人认为，它是本书中最难的算法。代码非常诡异，区区十数行代码居然包含了如此复杂的逻辑，实在让人汗颜，在此向前辈大师深深地致敬。另一个就是C#中的Dictionary&lt;TKey,TValue&gt;类，第一次读这段代码时让我有拍案叫绝的感觉，实在是太漂亮了，我被她的美所深深折服。感叹自己怎么就想不出这么巧妙的实现呢！当然我也没忘记用程序来展现她的美：</P>
<P><A href="http://img.blog.163.com/photo/dIg2Mn2yy7XF4_5qTrXrYA==/2857252488590800712.jpg" target=_blank><IMG title="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" alt="新书预告---《数据结构--C语言描述》 - 阿巴睇 - 阿巴睇的博客" src="http://img.blog.163.com/photo/dIg2Mn2yy7XF4_5qTrXrYA==/2857252488590800712.jpg"></A></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 由于是高职高专教材，所以只能介绍那些最基本的数据结构，本书做为数据结构的入门教材还是非常合适的。最遗憾的是没有讲解SortedDictionary，它是红黑树的实现，实在是太过复杂，不适合高职使用。这些高级的数据结构将来我会以博客的方式写出来。本书的出版时间大约是明年初，敬请关注。</P>
<P>AVL和红黑树请查看以下网址：</P>
<P>AVL树：</P>
<P><A href="http://www.cnblogs.com/abatei/archive/2008/11/17/1335031.html"><FONT color=#91680d>http://www.cnblogs.com/abatei/archive/2008/11/17/1335031.html</FONT></A></P>
<P>红黑树：</P>
<P><A href="http://www.cnblogs.com/abatei/archive/2008/12/17/1356565.html"><FONT color=#91680d>http://www.cnblogs.com/abatei/archive/2008/12/17/1356565.html</FONT></A></P>
<P>视频公布了一集，请到以下地址下载：</P>
<P><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman"><FONT face=Arial><A href="http://www.fileupyours.com/files/219335/5-2.swf"></A><A href="http://www.fileupyours.com/files/219335/5-2.swf"><FONT color=#91680d>http://www.fileupyours.com/files/219335/5-2.swf</FONT></A></FONT></FONT></SPAN></SPAN></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582008910115555901</comments>
    <slash:comments>35</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582008910115555901</guid>
    <pubDate>Sat, 11 Oct 2008 00:30:58 +0800</pubDate>
    <dcterms:modified>2009-03-17T23:44:14+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Today]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582008811105446755</link>
    <description><![CDATA[<div><P>第一次听到《Today》这首歌是很多年前的事了，那是欧瑞强的一张民歌专辑，当时被这优美的旋律深深吸引。近日偶然听到藤田惠美重新演绎的这首歌，还是那么动人。我决定要把这首歌背下来，在网上找到了歌词，看了一下，感觉没有国外的文化背景很难理解这首歌含义，不过这又有什么关系呢！歌词虽然是外文，但很有诗性。</P>
<P>Today while the blossoms still cling to the vine (今天，当那些花儿仍攀附着藤蔓)<BR>I'll taste your straw berries （我将品尝你的草莓）<BR>I'll drink your sweet wine&nbsp; （我将痛饮你的二锅头）<BR><BR>A million tomorrows shall all pass away<BR>Ere I forget all the joy that is mine<BR>today</P>
<P>（就在我忘却今天的欢乐之前，百万个明天都会逝去）<BR><BR>I'll be a dandy and I'll be a rover （我会成为花花公子，我会成为一个流浪汉）<BR>You'll know who I am by the song that I sing （听到我的歌声，就会知道我是谁）<BR>I'll feast at your table （我要与你共饮）<BR>I'll sleep in your clover （我要安逸地睡着）<BR><BR>Who cares what the morrow shall bring? （不要在意明天会如何）<BR><BR>Today while the blossoms still cling to the vine&nbsp; <BR>I'll taste your straw berries <BR>I'll drink your sweet wine </P>
<P><BR>I can't be contented with yesterday's glory （我不能满足于昨日的辉煌）<BR>I can't live on promises winter to spring （冬去春来，我不能把诺言守望）<BR><BR>Today is my moment and now is my story （今天是属于我的时刻，现在是我的故事）<BR>I'll laugh and I'll cry and I'll sing （我要放声大笑，我要哭泣，我要歌唱）<BR><BR>Today while the blossoms still cling to the vine<BR>I'll taste your straw berries<BR>I'll drink your sweet wine<BR>A million tomorrows shall all pass away<BR>Ere I forget all the joy that is mine today<BR></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582008811105446755</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582008811105446755</guid>
    <pubDate>Thu, 11 Sep 2008 22:54:46 +0800</pubDate>
    <dcterms:modified>2008-09-11T22:57:56+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[C#与数据结构--图的遍历]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/241235582008561245867</link>
    <description><![CDATA[<div><H2 style="MARGIN: 13pt 0cm"><SPAN lang=EN-US style="mso-no-proof: yes">8.2 </SPAN><SPAN style="FONT-FAMILY: 黑体; mso-no-proof: yes; mso-ascii-font-family: Arial">图的存储结构</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></H2>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图的存储结构除了要存储图中各个顶点的本身的信息外，同时还要存储顶点与顶点之间的所有关系（边的信息），因此，图的结构比较复杂，很难以数据元素在存储区中的物理位置来表示元素之间的关系，但也正是由于其任意的特性，故物理表示方法很多。常用的图的存储结构有邻接矩阵、邻接表、十字链表和邻接多重表。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.2.1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">邻接矩阵表示法</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于一个具有</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">n</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个顶点的图，可以使用</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">n*n</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的矩阵（二维数组）来表示它们间的邻接关系。图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.10</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.11</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中，矩阵</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A(i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">j)=1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示图中存在一条边</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">(V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes">)</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，而</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A(i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">j)=0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示图中不存在边</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">(V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes">)</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。实际编程时，当图为不带权图时，可以在二维数组中存放</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">bool</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">值，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A(i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">j)=true</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示存在边</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">(V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes">)</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A(i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">j)=false</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示不存在边</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">(V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes">)</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">；当图带权值时，则可以直接在二维数组中存放权值，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A(i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">j)=null</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示不存在边</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">(V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes">)</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><A href="http://img.blog.163.com/photo/nmPAJHgKCpxWkGKR16SnOw==/883831426872067945.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/nmPAJHgKCpxWkGKR16SnOw==/883831426872067945.jpg"></A></SPAN></P><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face=宋体>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.10</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的是无向图的邻接矩阵表示法，可以观察到，矩阵延对角线对称，即</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A(i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">j)= A(j</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。无向图邻接矩阵的第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">行或第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">列非零元素的个数其实就是第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个顶点的度。这表示无向图邻接矩阵存在一定的数据冗余。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.11</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的是有向图邻接矩阵表示法，矩阵并不延对角线对称，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A(i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">j)=1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示顶点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">邻接到顶点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">；</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A(j</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i)=1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">则表示顶点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">邻接自顶点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。两者并不象无向图邻接矩阵那样表示相同的意思。有向图邻接矩阵的第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">行非零元素的个数其实就是第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个顶点的出度，而第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">列非零元素的个数是第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个顶点的入度，即第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个顶点的度是第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">行和第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">列非零元素个数之和。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">由于存在</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">n</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个顶点的图需要</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">n</SPAN><SUP><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">2</SPAN></SUP></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt; mso-hansi-font-family: 'Times New Roman'">个数组元素进行存储，</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当图为稀疏图时，使用邻接矩阵存储方法将出现大量零元素，照成极大地空间浪费，这时应该使用邻接表表示法存储图中的数据。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.2.2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">邻接表表示法</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图的邻接矩阵存储方法跟树的孩子链表示法相类似，是一种顺序分配和链式分配相结合的存储结构。邻接表由表头结点和表结点两部分组成，其中图中每个顶点均对应一个存储在数组中的表头结点。如这个表头结点所对应的顶点存在相邻顶点，则把相邻顶点依次存放于表头结点所指向的单向链表中。如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.12</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示，表结点存放的是邻接顶点在数组中的索引。对于无向图来说，使用邻接表进行存储也会出现数据冗余，表头结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所指链表中存在一个指向</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">C</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的表结点的同时，表头结点</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">C</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所指链表也会存在一个指向</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的表结点。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><A href="http://img.blog.163.com/photo/rZtBzPH2oao6oc48VSNQdQ==/566327653142318394.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/rZtBzPH2oao6oc48VSNQdQ==/566327653142318394.jpg"></A></SPAN></P><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有向图的邻接表有出边表和入边表（又称逆邻接表）之分。出边表的表结点存放的是从表头结点出发的有向边所指的尾顶点；入边表的表结点存放的则是指向表头结点的某个头顶点。如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.13</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示，图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">(b)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">(c)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分别为有向图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">(a)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的出边表和入边表。</SPAN></P><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><A href="http://img.blog.163.com/photo/WciqOLVWd3SNBlWkG8omlA==/3730387866346859417.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/WciqOLVWd3SNBlWkG8omlA==/3730387866346859417.jpg"></A></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以上所讨论的邻接表所表示的都是不带权的图，如果要表示带权图，可以在表结点中增加一个存放权的字段，其效果如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.14</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><A href="http://img.blog.163.com/photo/4IXTAwGWz3aS3QgfZu6zrw==/566327653142318402.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/4IXTAwGWz3aS3QgfZu6zrw==/566327653142318402.jpg"></A></SPAN></P><SPAN lang=EN-US style="mso-no-proof: yes">
<P style="MARGIN: 0cm 22.9pt 0pt 27pt; mso-para-margin-top: 0cm; mso-para-margin-right: 2.18gd; mso-para-margin-bottom: .0001pt; mso-para-margin-left: 2.57gd"><SPAN style="FONT-FAMILY: 楷体_GB2312">【注意】：观察图<SPAN lang=EN-US>8.14</SPAN>可以发现，当删除存储表头结点的数组中的某一元素，有可能使部分表头结点索引号的改变，从而导致大面积修改表结点的情况发生。可以在表结点中直接存放指向表头结点的指针以解决这个问题（在链表中存放类实例即是存放指针，但必须要保证表头结点是类而不是结构体）。在实际创建邻接表时，甚至可以使用链表代替数组存放表头结点或使用顺序表存代替链表存放表结点。对所学的数据结构知识应当根据实际情况及所使用语言的特点灵活应用，切不可生搬硬套。<SPAN lang=EN-US></SPAN></SPAN></P>
<P style="MARGIN: 0cm 22.9pt 0pt 0cm; mso-para-margin-right: 2.18gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">8-1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>AdjacencyList.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】图的邻接表存储结构</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">1<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>&65279;using System;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">2<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>using System.Collections.Generic;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">3<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>public class AdjacencyList&lt;T&gt;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">5<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>List&lt;Vertex&lt;T&gt;&gt; items; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">图的顶点集合</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">6<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public AdjacencyList() : this(10) { } //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">构造方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">7<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public AdjacencyList(int capacity) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">指定容量的构造方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">8<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">9<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>items = new List&lt;Vertex&lt;T&gt;&gt;(capacity);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">10<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">11<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public void AddVertex(T item) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">添加一个顶点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">12<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">不允许插入重复值</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">13<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (Contains(item))</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">14<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">15<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>throw new ArgumentException("</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">插入了重复顶点！</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">16<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">17<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>items.Add(new Vertex&lt;T&gt;(item));</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">18<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">19<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public void AddEdge(T from, T to) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">添加无向边</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">20<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">21<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Vertex&lt;T&gt; fromVer = Find(from); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">找到起始顶点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">22<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (fromVer == null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">23<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">24<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>throw new ArgumentException("</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">头顶点并不存在！</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">25<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">26<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Vertex&lt;T&gt; toVer = Find(to); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">找到结束顶点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">27<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</SPAN>if (toVer == null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">28<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">29<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>throw new ArgumentException("</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">尾顶点并不存在！</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">30<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">31<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">无向边的两个顶点都需记录边信息</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">32<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>AddDirectedEdge(fromVer, toVer);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">33<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>AddDirectedEdge(toVer, fromVer);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">34<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">35<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public bool Contains(T item) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">查找图中是否包含某项</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">36<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">37<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>foreach (Vertex&lt;T&gt; v in items)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">38<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">39<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (v.data.Equals(item))</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">40<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">41<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return true;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">42<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">43<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">44<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return false;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">45<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">46<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private Vertex&lt;T&gt; Find(T item) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">查找指定项并返回</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">47<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">48<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>foreach (Vertex&lt;T&gt; v in items)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">49<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">50<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (v.data.Equals(item))</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">51<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">52<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return v;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">53<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">54<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">55<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return null;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">56<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">57<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">添加有向边</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">58<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private void AddDirectedEdge(Vertex&lt;T&gt; fromVer, Vertex&lt;T&gt; toVer)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">59<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">60<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (fromVer.firstEdge == null) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">无邻接点时</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">61<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">62<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>fromVer.firstEdge = new Node(toVer);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">63<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">64<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>else</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">65<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">66<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node tmp, node = fromVer.firstEdge;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">67<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>do</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">68<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">检查是否添加了重复边</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">69<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (node.adjvex.data.Equals(toVer.data))</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">70<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">71<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>throw new ArgumentException("</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">添加了重复的边！</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">72<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">73<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tmp = node;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">74<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>node = node.next;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">75<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>} while (node != null);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">76<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tmp.next = new Node(toVer); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">添加到链表未尾</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">77<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">78<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">79<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public override string ToString() //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">仅用于测试</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">80<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">打印每个节点和它的邻接点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">81<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>string s = string.Empty;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">82<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>foreach (Vertex&lt;T&gt; v in items)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">83<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">84<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s += v.data.ToString() + ":";</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">85<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (v.firstEdge != null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">86<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">87<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>Node tmp = v.firstEdge;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">88<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (tmp != null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">89<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">90<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s += tmp.adjvex.data.ToString();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">91<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tmp = tmp.next;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">92<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">93<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">94<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s += "\r\n";</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">95<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">96<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return s;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">97<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">98<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">嵌套类，表示链表中的表结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">99<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public class Node</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">100<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">101<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Vertex&lt;T&gt; adjvex; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">邻接点域</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">102<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Node next; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">下一个邻接点指针域</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">103<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Node(Vertex&lt;T&gt; value)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">104<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">105<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>adjvex = value;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">106<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">107<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">108<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">嵌套类，表示存放于数组中的表头结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">109<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public class Vertex&lt;TValue&gt;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">110<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">111<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public TValue data; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">数据</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">112<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Node firstEdge; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">邻接点链表头指针</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">113<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Boolean visited; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">访问标志</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">,</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">遍历时使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">114<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Vertex(TValue value) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">构造方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">115<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">116<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>data = value;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">117<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">118<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">119 }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AdjacencyList&lt;T&gt;</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类使用泛型实现了图的邻接表存储结构。它包含两个内部类，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Vertex&lt;Tvalue&gt;</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类（</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">10</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-no-proof: yes">9</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes">～<SPAN lang=EN-US>118</SPAN>行代码</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）用于表示一个表头结点，</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类（</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">9</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-no-proof: yes">9</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes">～<SPAN lang=EN-US>107</SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）则用于表示表结点，其中存放着邻接点信息，用来表示表头结点的某条边。多个</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">next</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">指针相连形成一个单链表，表头指针为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Vertex</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类的</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">firstEdge</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">成员，表头结点所代表的顶点的所有边的信息均包含在链表内，其结构如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.12</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示。所不同之处在于：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Vertex</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类中包含了一个</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">visited</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">成员，它的作用是在图遍历时标识当前节点是否被访问过，这一点在稍后会讲到。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-no-proof: yes; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">邻接点指针域</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">adjvex</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">直接指向某个表头结点，而不是表头结点在数组中的索引。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AdjacencyList&lt;T&gt;</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类中使用了一个泛型</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">List</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代替数组来保存表头结点信息（第</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">行代码），从而不再考虑数组存储空间不够的情况发生，简化了操作。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">由于一条无向边的信息需要在边的两个顶点分别存储信息，即添加两个有向边，所以</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">5</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-no-proof: yes">8</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes">～<SPAN lang=EN-US>78</SPAN>行代码的私有方法<SPAN lang=EN-US>AddDirectedEdge()</SPAN>方法用于添加一个有向边。新的邻接点信息即可以添加到链表的头部也可以添加到尾部，添加到链表头部可以简化操作，但考虑到要检查是否添加了重复边，需要遍历整个链表，所以最终把邻接点信息添加到链表尾部。<SPAN lang=EN-US></SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">8-1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Demo8-1.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】图的邻接表存储结构测试</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&65279;using System;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>class Demo8_1</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>static void Main(string[] args)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">5<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">6<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>AdjacencyList&lt;char&gt; a = new AdjacencyList&lt;char&gt;();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">7<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">添加顶点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">8<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex('A');</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">9<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex('B');</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">10<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex('C');</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">11<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex('D');</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">12<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">添加边</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">13<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge('A', 'B');</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">14<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge('A', 'C');</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">15<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge('A', 'D');</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">16<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge('B', 'D');</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">17<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.WriteLine(a.ToString());</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">18<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">19 }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">运行结果：</SPAN></P><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BCD</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">B</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AD</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">C</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">A</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">D</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AB</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本例存储的表如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.12</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示，结果中，冒号前面的是表头结点，冒号后面的是链表中的表结点。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H2 style="MARGIN: 13pt 0cm"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face=Arial>8.3 </FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-no-proof: yes; mso-ascii-font-family: Arial">图的遍历</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></H2>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和树的遍历类似，在此，我们希望从图中某一顶点出发访遍图中其余顶点，且使每一个顶点仅被访问一次，这一过程就叫做图的遍历</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">(TraversingGraph)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。如果只访问图的顶点而不关注边的信息，那么图的遍历十分简单，使用一个</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">foreach</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">语句遍历存放顶点信息的数组即可。但如果为了实现特定算法，就需要根据边的信息按照一定顺序进行遍历。图的遍历算法是求解图的连通性问题、拓扑排序和求关键路径等算法的基础。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图的遍历要比树的遍历复杂得多，由于图的任一顶点都可能和其余顶点相邻接，故在访问了某顶点之后，可能顺着某条边又访问到了已访问过的顶点，因此，在图的遍历过程中，必须记下每个访问过的顶点，以免同一个顶点被访问多次。为此给顶点附设访问标志</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">visited</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，其初值为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">false</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，一旦某个顶点被访问，则其</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">visited</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">标志置为</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">true</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图的遍历方法有两种：一种是深度优先搜索遍历（</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Depth-First Search </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">简称</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">DFS</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）；另一种是广度优先搜索遍历（</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">Breadth_First Search </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">简称</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">BFS</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.3.1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">深度优先搜索遍历</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图的深度优先搜索遍历类似于二叉树的深度优先搜索遍历。其基本思想如下：假定以图中某个顶点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为出发点，首先访问出发点，然后选择一个</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的未访问过的邻接点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，以</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">j</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为新的出发点继续进行深度优先搜索，直至图中所有顶点都被访问过。显然，这是一个递归的搜索过程。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">现以图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.15</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为例说明深度优先搜索过程。假定</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">1</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是出发点，首先访问</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">1</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。因</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">1</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有两个邻接点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">2</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">3</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">均末被访问过，可以选择</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">2</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为新的出发点，访问</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">2</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之后，再找</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">2</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的末访问过的邻接点。同</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">2</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">邻接的有</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">1</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">4</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">5</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，其中</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">1</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">已被访问过，而</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">4</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">5</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">尚未被访问过，可以选择</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">4</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为新的出发点。重复上述搜索过程，继续依次访问</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">8</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">5</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。访问</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">5</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之后，由于与</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">5</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">相邻的顶点均已被访问过，搜索退回到</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">8</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，访问</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">8</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的另一个邻接点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">6</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。接下来依次访问</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">3</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">7</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，最后得到的的顶点的访问序列为：</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">1</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN style="mso-no-proof: yes"> <SPAN lang=EN-US>V</SPAN></SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">2</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN style="mso-no-proof: yes"> <SPAN lang=EN-US>V</SPAN></SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">4</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN style="mso-no-proof: yes"> <SPAN lang=EN-US>V</SPAN></SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">8</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN style="mso-no-proof: yes"> <SPAN lang=EN-US>V</SPAN></SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">5</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN style="mso-no-proof: yes"> <SPAN lang=EN-US>V</SPAN></SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">6</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN style="mso-no-proof: yes"> <SPAN lang=EN-US>V</SPAN></SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">3</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN style="mso-no-proof: yes"> <SPAN lang=EN-US>V</SPAN></SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">7</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><A href="http://img.blog.163.com/photo/Mk0vNPsvT5w6Jg5EmyNDEA==/566327653142318403.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/Mk0vNPsvT5w6Jg5EmyNDEA==/566327653142318403.jpg"></A></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面根据上一节创建的邻接表存储结构添加深度优先搜索遍历代码。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 22.9pt 0pt 0cm; mso-para-margin-right: 2.18gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">8-2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>DFSTraverse.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】深度优先搜索遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; 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><FONT face="Times New Roman">8-1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>AdjacencyList.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】，<SPAN style="mso-no-proof: yes">在</SPAN></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">AdjacencyList&lt;T&gt;</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类中添加以下代码后，将文件另存为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">DFSTraverse.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">35<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public void DFSTraverse() //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">深度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">36<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">37<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>InitVisited(); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">将</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">visited</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">标志全部置为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">false</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">38<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DFS(items[0]); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">从第一个顶点开始遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">39<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">40<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private void DFS(Vertex&lt;T&gt; v) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">使用递归进行深度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">41<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">42<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>v.visited = true; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">将访问标志设为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">true</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">43<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.Write(v.data + " "); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">访问</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">44<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node node = v.firstEdge;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">45<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (node != null) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">访问此顶点的所有邻接点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">46<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">如果邻接点未被访问，则递归访问它的边</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">47<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (!node.adjvex.visited)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">48<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">49<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DFS(node.adjvex); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">递归</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">50<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">51<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>node = node.next; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">访问下一个邻接点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">52<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">53<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">&nbsp;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">98<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private void InitVisited() //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">初始化</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">visited</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">标志</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">99<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">100<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>foreach (Vertex&lt;T&gt; v in items)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">101<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">102<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>v.visited = false; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">全部置为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">false</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">103<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">104<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 22.9pt 0pt 0cm; mso-para-margin-right: 2.18gd"><SPAN lang=EN-US><FONT face="Times New Roman">&nbsp;</FONT></SPAN></P>
<P style="MARGIN: 0cm 22.9pt 0pt 0cm; mso-para-margin-right: 2.18gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">8-2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Demo8-2.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】深度优先搜索遍历测试</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&65279;using System;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>class Demo8_2</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>static void Main(string[] args)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">5<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">6<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>AdjacencyList&lt;string&gt; a = new AdjacencyList&lt;string&gt;();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">7<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V1");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">8<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V2");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">9<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V3");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">10<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V4");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">11<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V5");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">12<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V6");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">13<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V7");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">14<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">15<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V1", "V2");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">16<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V1", "V3");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">17<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>a.AddEdge("V2", "V4");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">18<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V2", "V5");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">19<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V3", "V6");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">20<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V3", "V7");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">21<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V4", "V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">22<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V5", "V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">23<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V6", "V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">24<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V7", "V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">25<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.DFSTraverse();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">26<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">27 }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行结果：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">V1 V2 V4 V8 V5 V6 V3 V7</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本例参照图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8-15</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进行设计，运行过程请参照对图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8-15</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所作的分析。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.3.2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">广度优先搜索遍历</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图的广度优先搜索遍历算法是一个分层遍历的过程，和二叉树的广度优先搜索遍历类同。它从图的某一顶点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">出发，访问此顶点后，依次访问</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的各个未曾访问过的邻接点，然后分别从这些邻接点出发，直至图中所有已有已被访问的顶点的邻接点都被访问到。对于图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.15</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的无向连通图，若顶点</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">i</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为初始访问的顶点，则广度优先搜索遍历顶点访问顺序是：</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes">V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">1</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes"> V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">2</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes"> V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">3</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes"> V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">4</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes"> V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">5</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes"> V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">6</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes"> V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">7</SPAN></SUB><SPAN lang=EN-US style="mso-no-proof: yes"> </SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">→</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-no-proof: yes"> V</SPAN><SUB><SPAN lang=EN-US style="mso-no-proof: yes; mso-bidi-font-size: 10.5pt">8</SPAN></SUB></FONT><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。遍历过程如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">8.16</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的所示。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman"><A href="http://img.blog.163.com/photo/kIs712m_PyYUsDkD8VTKeQ==/566327653142318405.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/kIs712m_PyYUsDkD8VTKeQ==/566327653142318405.jpg"></A></FONT></SPAN></P><SPAN lang=EN-US style="mso-no-proof: yes"><FONT face="Times New Roman">
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和二叉树的广度优先搜索遍历类似，图的广度优先搜索遍历也需要借助队列来完成，例</SPAN><SPAN lang=EN-US style="mso-no-proof: yes">8.3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">演示了这个过程。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 22.9pt 0pt 0cm; mso-para-margin-right: 2.18gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US>8-3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>BFSTraverse.cs</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】广度优先搜索遍历</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; 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>8-2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>DFSTraverse.cs</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】，<SPAN style="mso-no-proof: yes">在</SPAN></SPAN><SPAN lang=EN-US style="mso-no-proof: yes">AdjacencyList&lt;T&gt;</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类中添加以下代码后，将文件另存为</SPAN><SPAN lang=EN-US>BFSTraverse.cs</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">54<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public void BFSTraverse() //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">广度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">55<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">56<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>InitVisited(); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">将</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">visited</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">标志全部置为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">false</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">57<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>BFS(items[0]); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">从第一个顶点开始遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">58<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">59<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private void BFS(Vertex&lt;T&gt; v) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">使用队列进行广度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">60<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">创建一个队列</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">61<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>Queue&lt;Vertex&lt;T&gt;&gt; queue = new Queue&lt;Vertex&lt;T&gt;&gt;();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">62<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.Write(v.data + " "); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">访问</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">63<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>v.visited = true; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">设置访问标志</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">64<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>queue.Enqueue(v); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">进队</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">65<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (queue.Count &gt; 0) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">只要队不为空就循环</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">66<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">67<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Vertex&lt;T&gt; w = queue.Dequeue();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">68<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node node = w.firstEdge;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">69<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (node != null) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">访问此顶点的所有邻接点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">70<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">如果邻接点未被访问，则递归访问它的边</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">71<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (!node.adjvex.visited)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">72<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">73<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.Write(node.adjvex.data + " "); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">访问</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">74<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>node.adjvex.visited = true; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">设置访问标志</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">75<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>queue.Enqueue(node.adjvex); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">进队</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">76<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">77<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>node = node.next; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">访问下一个邻接点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">78<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">79<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">80<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes">&nbsp;</SPAN></P>
<P style="MARGIN: 0cm 22.9pt 0pt 0cm; mso-para-margin-right: 2.18gd"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US>8-3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Demo8-3.cs</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】广度优先搜索遍历测试</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&65279;using System;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>class Demo8_3</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>static void Main(string[] args)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">5<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">6<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>AdjacencyList&lt;string&gt; a = new AdjacencyList&lt;string&gt;();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">7<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V1");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">8<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V2");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">9<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V3");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">10<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V4");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">11<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V5");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">12<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V6");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">13<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V7");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">14<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddVertex("V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">15<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V1", "V2");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">16<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V1", "V3");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">17<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>a.AddEdge("V2", "V4");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">18<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V2", "V5");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">19<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V3", "V6");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">20<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V3", "V7");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">21<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V4", "V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">22<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V5", "V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">23<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V6", "V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">24<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.AddEdge("V7", "V8");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">25<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>a.BFSTraverse(); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">广度优先搜索遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">26<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">27 }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行结果：</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes">V1 V2 V3 V4 V5 V6 V7 V8</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行结果请参照图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes">8.16</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进行分析。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US style="mso-no-proof: yes">8.3.3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">非连通图的遍历</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以上讨论的图的两种遍历方法都是相对于无向连通图的，它们都是从一个顶点出发就能访问到图中的所有顶点。若无向图是非连通图，则只能访问到初始点所在连通分量中的所有顶点，其他连通分量中的顶点是不可能访问到的（如图</SPAN><SPAN lang=EN-US style="mso-no-proof: yes">8.17</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示）。为此需要从其他每个连通分量中选择初始点，分别进行遍历，才能够访问到图中的所有顶点，否则不能访问到所有顶点。为此同样需要再选初始点，继续进行遍历，直到图中的所有顶点都被访问过为止。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="mso-no-proof: yes"><A href="http://img.blog.163.com/photo/xSoCFYvhtBiceX2xDYhClA==/1168402628326680772.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/xSoCFYvhtBiceX2xDYhClA==/1168402628326680772.jpg"></A></SPAN></P><SPAN lang=EN-US style="mso-no-proof: yes">
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上例的代码只需对</SPAN><SPAN lang=EN-US style="mso-no-proof: yes">DFSTraverse()</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法和</SPAN><SPAN lang=EN-US style="mso-no-proof: yes">BFSTraverse()</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-no-proof: yes; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法稍作修改，便可以遍历非连通图。</SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>public void DFSTraverse() //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">深度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>InitVisited(); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">将</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">visited</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">标志全部置为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">false</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</SPAN>foreach (Vertex&lt;T&gt; v in items)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (!v.visited) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">如果未被访问</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DFS(v); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">深度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>public void BFSTraverse() //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">广度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>InitVisited(); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">将</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">visited</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">标志全部置为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt">false</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>foreach (Vertex&lt;T&gt; v in items)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (!v.visited) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">如果未被访问</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>BFS(v); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-no-proof: yes; mso-ascii-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-bidi-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">广度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-char-indent-count: 2.0; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"></P></SPAN>&nbsp;</P></FONT></SPAN></SPAN></SPAN></SPAN><SPAN lang=EN-US style="mso-no-proof: yes"></SPAN></FONT></SPAN></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/241235582008561245867</comments>
    <slash:comments>10</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/241235582008561245867</guid>
    <pubDate>Fri, 6 Jun 2008 13:24:58 +0800</pubDate>
    <dcterms:modified>2008-06-06T13:24:58+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[新书配套实训视频--图片管理器(8)完]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/2412355820085504927870</link>
    <description><![CDATA[<div><P>下载地址:</P>
<P><A href="http://bbs.langsin.com/viewthread.php?tid=6070&amp;extra=page%3D1">http://bbs.langsin.com/viewthread.php?tid=6070&amp;extra=page%3D1</A></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/2412355820085504927870</comments>
    <slash:comments>9</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/2412355820085504927870</guid>
    <pubDate>Thu, 5 Jun 2008 12:49:27 +0800</pubDate>
    <dcterms:modified>2008-06-05T12:49:27+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[《C#程序设计基础教程与实训》173页运动的球的更简洁代码]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/24123558200842811223418</link>
    <description><![CDATA[<div><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 上周上C#讲解课本172页运动的球，由于是从一个圆圈画起，一步一步实现，没有怎么看书。完成后发现代码居然跟课本不一样，而且少了好几行，感觉有些诧异。两者原理一样，只是代码数量不同，现把改进后的代码贴上来供大家参考。</P>
<P>课本173页28～52行代码改为：</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; ballArr.GetLength(0); i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ballArr[i, 0] + ballDia &gt; ClientSize.Width || ballArr[i, 0] &lt; 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp; //超出左或右边界<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ballArr[i, 2] = -ballArr[i, 2];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ballArr[i, 1] + ballDia &gt; ClientSize.Height || ballArr[i, 1] &lt; 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp; //超出上或下边界<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ballArr[i, 3] = -ballArr[i, 3];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ballArr[i, 0] += ballArr[i, 2]; //延X轴移动<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ballArr[i, 1] += ballArr[i, 3]; //延Y轴移动<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/24123558200842811223418</comments>
    <slash:comments>8</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/24123558200842811223418</guid>
    <pubDate>Wed, 28 May 2008 23:02:23 +0800</pubDate>
    <dcterms:modified>2008-05-28T23:02:23+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[C#与数据结构--二叉树的遍历]]></title>	
    <link>http://cgbluesky.blog.163.com/blog/static/24123558200842311354144</link>
    <description><![CDATA[<div><H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US><FONT face="Times New Roman">6.2.2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的存储结构</SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的存储可分为两种：顺序存储结构和链式存储结构。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体; mso-bidi-font-family: 楷体_GB2312"><SPAN style="mso-list: Ignore">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体">顺序存储结构<SPAN lang=EN-US></SPAN></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">把一个满二叉树自上而下、从左到右顺序编号，依次存放在数组内，可得到图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.8(a)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的结果。设满二叉树结点在数组中的索引号为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，那么有如下性质。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l0 level2 lfo1; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（1）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i = 0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，此结点为根结点，无双亲。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l0 level2 lfo1; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（2）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i &gt; 0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，则其双亲结点为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">(i -1) / 2 </FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。（注意，这里的除法是整除，结果中的小数部分会被舍弃。）</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l0 level2 lfo1; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（3）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结点</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的左孩子为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">2i + 1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，右孩子为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">2i + 2</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l0 level2 lfo1; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（4）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i &gt; 0</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，当</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为奇数时，它是双亲结点的左孩子，它的兄弟为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i + 1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">；当</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为偶数时，它是双新结点的右孩子，它的兄弟结点为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">i – 1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l0 level2 lfo1; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（5）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">深度为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">k</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的满二叉树需要长度为</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US>2</SPAN><SUP><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"> k-1</SPAN></SUP></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">的数组进行存储。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通过以上性质可知，使用数组存放满二叉树的各结点非常方便，可以根据一个结点的索引号很容易地推算出它的双亲、孩子、兄弟等结点的编号，从而对这些结点进行访问，这是一种存储二叉满二叉树或完全二叉树的最简单、最省空间的做法。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为了用结点在数组中的位置反映出结点之间的逻辑关系，存储一般二叉树时，只需要将数组中空结点所对应的位置设为空即可，其效果如图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.8(b)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示。这会造成一定的空间浪费，但如果空结点的数量不是很多，这些浪费可以忽略。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个深度为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">k</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的二叉树需要</SPAN><FONT face="Times New Roman"><SPAN lang=EN-US>2</SPAN><SUP><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"> k-1</SPAN></SUP></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">个存储空间，当</SPAN><SPAN lang=EN-US style="mso-bidi-font-size: 10.5pt"><FONT face="Times New Roman">k</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt">值很大并且二叉树的空结点很多时，最坏的情况是每层只有一个结点，再使用顺序存储结构来存储显然会造成极大地浪费，这时就应该使用链式存储结构来存储二叉树中的数据。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.5pt"><A href="http://img.blog.163.com/photo/hHsjPWF_svuH6W-BKYAusA==/5143392249434326573.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/hHsjPWF_svuH6W-BKYAusA==/5143392249434326573.jpg"></A></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 42.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体; mso-bidi-font-family: 楷体_GB2312"><SPAN style="mso-list: Ignore">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体">链式存储结构<SPAN lang=EN-US></SPAN></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的链式存储结构可分为二叉链表和三叉链表。二叉链表中，每个结点除了存储本身的数据外，还应该设置两个指针域</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">left</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">right</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，它们分别指向左孩子和右孩子（如图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.9(a)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示）。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当需要在二叉树中经常寻找某结点的双亲，每个结点还可以加一个指向双亲的指针域</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">parent</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.9(b)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示，这就是三叉链表。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><A href="http://img.blog.163.com/photo/Rqcbz24x_OCdq06m8Yd33g==/5143392249434326574.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/Rqcbz24x_OCdq06m8Yd33g==/5143392249434326574.jpg"></A></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.10</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的是二叉链表和三叉链表的存储结构，其中虚线箭头表示</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">parent</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">指针所指方向。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><A href="http://img.blog.163.com/photo/DlyCj6MKB7AT7d04Tz-GPQ==/3998070569198544374.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/DlyCj6MKB7AT7d04Tz-GPQ==/3998070569198544374.jpg"></A></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树还有一种叫双亲链表的存储结构，它只存储结点的双亲信息而不存储孩子信息，由于二叉树是一种有序树，一个结点的两个孩子有左右之分，因此结点中除了存放双新信息外，还必须指明这个结点是左孩子还是右孩子。由于结点不存放孩子信息，无法通过头指针出发遍历所有结点，因此需要借助数组来存放结点信息。图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.10(a)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的二叉树使用双亲链表进行存储将得到图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.11</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的结果。由于根节点没有双新，所以它的</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">parent</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">指针的值设为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><A href="http://img.blog.163.com/photo/ncVc2kvL7FGad-Wy4kAenw==/5143392249434326576.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/ncVc2kvL7FGad-Wy4kAenw==/5143392249434326576.jpg"></A></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">双亲链表中元素存放的顺序是根据结点的添加顺序来决定的，也就是说把各个元素的存放位置进行调换不会影响结点的逻辑结构。由图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.11</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可知，双亲链表在物理上是一种顺序存储结构。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树存在多种存储结构，选用何种方法进行存储主要依赖于对二叉树进行什么操作来确定。而二叉链表是二叉树最常用的存储结构，下面几节给出的有关二叉树的算法大多基于二叉链表存储结构。</SPAN></P>
<H2 style="MARGIN: 13pt 0cm"><SPAN lang=EN-US>6.3 </SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">二叉树的遍历</SPAN></H2>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树遍历（</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Traversal</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）就是按某种顺序对树中每个结点访问且只能访问一次的过程。访问的含义很广，如查询、计算、修改、输出结点的值。树遍历本质上是将非线性结构线性化，它是二叉树各种运算和操作的实现基础，需要高度重视。</SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US><FONT face="Times New Roman">6.3.1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的深度优先遍历</SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们是用递归的方法来定义二叉树的。每棵二叉树由结点、左子树、右子树这三个基本部分组成，如果遍历了这三部分，也就遍历了整个二叉树。如图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.12</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示，</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">D</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为二叉树中某一结点，</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">L</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">R</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分别为结点</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">D</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的左、右子树，则其遍历方式有</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">种：</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><A href="http://img.blog.163.com/photo/zOt64oZlmuRkW4ZyihTTfw==/5143392249434326577.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/zOt64oZlmuRkW4ZyihTTfw==/5143392249434326577.jpg"></A></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"><FONT face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></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 style="mso-spacerun: yes"><FONT face="Times New Roman">&nbsp;&nbsp; </FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">先右后左</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">先序</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DLR<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DRL</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中序</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>LDR<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>RDL</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">后序</SPAN><SPAN lang=EN-US><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>LRD<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>RLD</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这里只讨论先左后右的三种遍历算法。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.13</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示，在沿着箭头方向所指的路径对二叉树进行遍历时，每个节点会在这条搜索路径上会出现三次，而访问操作只能进行一次，这时就需要决定在搜索路径上第几次出现的结点进行访问操作，由此就引出了三种不同的遍历算法。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 42.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体; mso-bidi-font-family: 楷体_GB2312"><SPAN style="mso-list: Ignore"><A href="http://img.blog.163.com/photo/6wvmQFqUfWN8avkMTaQotw==/5143392249434326578.jpg" target=_blank><IMG src="http://img.blog.163.com/photo/6wvmQFqUfWN8avkMTaQotw==/5143392249434326578.jpg"></A></SPAN></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 42.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体; mso-bidi-font-family: 楷体_GB2312"><SPAN style="mso-list: Ignore">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体">先序遍历<SPAN lang=EN-US></SPAN></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">若二叉树为非空，则过程为：</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l0 level2 lfo1; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（1）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">访问根节点。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l0 level2 lfo1; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（2）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">先序遍历左子树。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l0 level2 lfo1; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（3）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">先序遍历右子树。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.13</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中，先序遍历就是把标号为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">(1)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的结点按搜索路径访问的先后次序连接起来，得出结果为：</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">ABDECF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 42.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体; mso-bidi-font-family: 楷体_GB2312"><SPAN style="mso-list: Ignore">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体">中序遍历<SPAN lang=EN-US></SPAN></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">若二叉树为非空，则过程为：</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l1 level2 lfo2; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（1）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">按中序遍历左子树。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l1 level2 lfo2; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（2）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">访问根结点。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l1 level2 lfo2; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（3）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">按中序遍历右子树。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.13</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中，先序遍历就是把标号为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">(2)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的结点按搜索路径访问的先后次序连接起来，得出结果为：</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">DBEACF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l1 level1 lfo2; tab-stops: list 42.0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体; mso-bidi-font-family: 楷体_GB2312"><SPAN style="mso-list: Ignore">3.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 楷体_GB2312; mso-hansi-font-family: 华文楷体">后序遍历<SPAN lang=EN-US></SPAN></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">若二叉树为非空，则过程为：</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l1 level2 lfo2; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（1）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">按后序遍历左子树。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l1 level2 lfo2; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（2）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">按后序遍历右子树</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l1 level2 lfo2; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（3）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">访问根结点。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.13</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中，先序遍历就是把标号为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">(3)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的结点按搜索路径访问的先后次序连接起来，得出结果为：</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">DEBFCA</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6-1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>BinaryTreeNode.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】二叉树结点类</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&amp;65279;using System;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>public class Node</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">成员变量</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">5<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private object _data; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">数据</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">6<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private Node _left; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">左孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">7<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private Node _right; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">右孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">8<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public object Data</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">9<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">10<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>get { return _data; }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">11<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">12<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Node Left //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">左孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">13<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">14<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>get { return _left; }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">15<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>set { _left = value; }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">16<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">17<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Node Right //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">右孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">18<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">19<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>get { return _right; }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">20<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>set { _right = value; }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">21<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">22<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">构造方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">23<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Node(object data)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">24<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">25<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>_data = data;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">26<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">27<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public override string ToString()</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">28<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">29<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return _data.ToString();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">30<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">31 }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类专门用于表示二叉树中的一个结点，它很简单，只有三个属性：</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Data</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示结点中的数据；</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Left</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示这个结点的左孩子，它是</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类型；</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Right</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示这个结点的右孩子，它也是</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Node</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类型。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6-1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>BinaryTree.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】二叉树集合类</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&amp;65279;using System;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>public class BinaryTree</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>{<SPAN style="mso-tab-count: 1"> </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">成员变量</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private Node _head; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">头指针</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">5<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private string cStr; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">用于构造二叉树的字符串</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">6<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public Node Head //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">头指针</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">7<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">8<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>get { return _head; }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">9<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">10<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">构造方法</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">11<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public BinaryTree(string constructStr)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">12<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">13<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>cStr = constructStr; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">保存构造字符串</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">14<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>_head = new Node(cStr[0]); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">添加头结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">15<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>Add(_head, 0); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">给头结点添加孩子结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">16<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">17<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>private void Add(Node parent, int index)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">18<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">19<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>int leftIndex = 2 * index + 1; //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">计算左孩子索引</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">20<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (leftIndex &lt; cStr.Length) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">如果索引没超过字符串长度</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">21<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">22<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (cStr[leftIndex] != '#') //'#'</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">表示空结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">23<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">添加左孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">24<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>parent.Left = new Node(cStr[leftIndex]);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">25<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">递归调用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">Add</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">方法给左孩子添加孩子节点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">26<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Add(parent.Left, leftIndex);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">27<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">28<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">29<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>int rightIndex = 2 * index + 2;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">30<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (rightIndex &lt; cStr.Length)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">31<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">32<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (cStr[rightIndex] != '#')</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">33<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">添加右孩子</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">34<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>parent.Right = new Node(cStr[rightIndex]);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">35<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">递归调用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">Add</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">方法给右孩子添加孩子节点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">36<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</SPAN>Add(parent.Right, rightIndex);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">37<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">38<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">39<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">40<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public void PreOrder(Node node) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">先序遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">41<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">42<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (node != null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">43<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">44<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.Write(node.ToString()); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">打印字符</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">45<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PreOrder(node.Left); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">递归</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">46<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>PreOrder(node.Right); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">递归</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">47<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">48<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">49<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public void MidOrder(Node node) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">中序遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">50<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">51<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (node != null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">52<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">53<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>MidOrder(node.Left); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">递归</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">54<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.Write(node.ToString()); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">打印字符</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">55<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>MidOrder(node.Right); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">递归</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">56<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">57<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">58<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public void AfterOrder(Node node) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">后继遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">59<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">60<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (node != null)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">61<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">62<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>AfterOrder(node.Left); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">递归</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">63<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>AfterOrder(node.Right); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">递归</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">64<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.Write(node.ToString()); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">打印字符</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">65<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">66<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">67 }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">BinaryTree</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是一个二叉树的集合类，它属于二叉链表，实际存储的信息只有一个头结点指针（</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Head</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">），由于是链式存储结构，可以由</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">Head</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">指针出发遍历整个二叉树。为了便于测试及添加结点，假设</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">BinaryTree</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类中存放的数据是字符类型，第</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">5</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">行声明了一个字符串类型成员</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">cStr</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，它用于存放结点中所有的字符。字符串由满二叉树的方式进行构造，空结点用‘</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">#</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">’号表示（参考本章“二叉树存储结构”这一小节中的“顺序存储结构”）。图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.13</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示的二叉树可表示为：“</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">ABCDE#F</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">”。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">1</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 宋体">1</SPAN><SPAN style="FONT-FAMILY: 宋体">～<SPAN lang=EN-US>16</SPAN>行的构造方法传入一个构造字符串，并在<SPAN lang=EN-US>Add()</SPAN>方法中根据这个字符串来构造二叉树中相应的结点。需要注意，这个构造方法只用于测试。<SPAN lang=EN-US></SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="FONT-FAMILY: 宋体">17</SPAN><SPAN style="FONT-FAMILY: 宋体">～<SPAN lang=EN-US>39</SPAN>行的<SPAN lang=EN-US>Add()</SPAN>方法用于添加结点，它的第一个参数<SPAN lang=EN-US>parent</SPAN>表示需要添加孩子结点的双亲结点，第二个参数<SPAN lang=EN-US>index</SPAN>表示这个双亲结点的编号（编号表示使用顺序存储结构时它在数组中的索引，请参考</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本章“二叉树存储结构”这一小节中的“顺序存储结构”</SPAN><SPAN style="FONT-FAMILY: 宋体">）。添加孩子结点的方法是先计算孩子结点的编号，然后通过这个编号在<SPAN lang=EN-US>cStr</SPAN>中取出相应的字符，并构造新的孩子结点用于存放这个字符，接下来递归调用<SPAN lang=EN-US>Add()</SPAN>方法给孩子结点添加它们的孩子结点。注意，这个方法只用于测试。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">4</FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 宋体">0</SPAN><SPAN style="FONT-FAMILY: 宋体">～<SPAN lang=EN-US>48</SPAN>行代码的<SPAN lang=EN-US>PreOrder()</SPAN>方法用于先序遍历，它的代码跟之前所讲解的先序遍历过程完全一样。<SPAN lang=EN-US></SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="FONT-FAMILY: 宋体">49</SPAN><SPAN style="FONT-FAMILY: 宋体">～<SPAN lang=EN-US>57</SPAN>行代码的<SPAN lang=EN-US>MidOrder()</SPAN>方法用于中序遍历。<SPAN lang=EN-US></SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="FONT-FAMILY: 宋体">58</SPAN><SPAN style="FONT-FAMILY: 宋体">～<SPAN lang=EN-US>66</SPAN>行代码的<SPAN lang=EN-US>AfterOrder()</SPAN>方法用于后序遍历。<SPAN lang=EN-US></SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体">以上三个方法都使用了递归来完成遍历，这符合二叉树的定义。<SPAN lang=EN-US></SPAN></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6-1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Demo6-1.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】二叉树深度优先遍历测试</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">1<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>using System;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>class Demo6_1</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">3<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>static void Main(string[] args)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">5<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">使用字符串构造二叉树</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">6<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>BinaryTree bTree = new BinaryTree("ABCDE#F");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">7<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bTree.PreOrder(bTree.Head); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">先序遍</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">8<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.WriteLine();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">9 <SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>bTree.MidOrder(bTree.Head); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">中序遍</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">10<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.WriteLine();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">11<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bTree.AfterOrder(bTree.Head); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">后序遍</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">12<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.WriteLine();</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">13<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">14 }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行结果：</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent">
<DIV>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">ABDECF</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">DBEACF</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">DEBFCA</FONT></SPAN></P></DIV></TD></TR></TBODY></TABLE></SPAN></P>
<H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US><FONT face="Times New Roman">6.3.2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二叉树的宽度优先遍历</SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之前所讲述的二叉树的深度优先遍历的搜索路径是首先搜索一个结点的所有子孙结点，再搜索这个结点的兄弟结点。是否可以先搜索所有兄弟和堂兄弟结点再搜索子孙结点呢？</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">由于二叉树结点分属不同的层次，因此可以从上到下、从左到右依次按层访问每个结点。它的访问顺序正好和之前所述二叉树顺序存储结构中的结点在数组中的存放顺序相吻合。如图</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6.13</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的二叉树使用宽度优先遍历访问的顺序为：</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">ABCDEF</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这个搜索过程不再需要使用递归，但需要借助队列来完成。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l2 level1 lfo3; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（1）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">将根结点压入队列之中，开始执行步骤</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">(2)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l2 level1 lfo3; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（2）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">若队列为空，则结束遍历操作，否则取队头结点</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">D</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l2 level1 lfo3; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（3）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">若结点</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">D</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的左孩子结点存在，则将其左孩子结点压入队列。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt 54pt; TEXT-INDENT: -27pt; mso-list: l2 level1 lfo3; tab-stops: list 54.0pt"><SPAN lang=EN-US style="mso-bidi-font-family: 宋体"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman">（4）<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">若结点</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">D</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的右孩子结点存在，则将其右孩子结点压入队列，并重复步骤</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">(2)</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6-2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>BinaryTreeNode.cs.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】二叉树结点类，使用例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">同名文件。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6-2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>LevelOrderBinaryTree.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】包含宽度优先遍历方法的二叉树集合类</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">打开例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6-1</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的【</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">BinaryTree.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】文件，在</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">BinaryTree</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类中添加如入方法后另存为</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">LevelOrderBinaryTree.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件。</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">68<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public void LevelOrder() //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">宽度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">69<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">70<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Queue queue = new Queue(); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">声明一个队例</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">71<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>queue.Enqueue(_head); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">把根结点压入队列</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">72<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>while (queue.Count &gt; 0) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">只要队列不为空</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">73<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">74<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Node node = (Node)queue.Dequeue(); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">出队</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">75<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Console.Write(node.ToString()); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">访问结点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">76<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (node.Left != null) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">如果结点左孩子不为空</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">77<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">把左孩子压入队列</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">78<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>queue.Enqueue(node.Left);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">79<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">80<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>if (node.Right != null) //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">如果结点右孩子不为熔</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">81<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">把右孩子压入队列</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">82<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>queue.Enqueue(node.Right);</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">83<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">84<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">85<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">【例</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">6-2<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Demo6-2.cs</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">】二叉树宽度优先遍历测试</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">1 using System;</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">2 class Demo6_2</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">3 {</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">4<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>static void Main(string[] args)</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">5<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>//</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">使用字符串构造二叉树</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">6<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>BinaryTree bTree = new BinaryTree("ABCDE#F");</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">7<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bTree.LevelOrder(); //</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 新宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">宽度优先遍历</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes"></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">8<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 12pt; TEXT-ALIGN: left; mso-line-height-rule: exactly; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 新宋体; mso-font-kerning: 0pt; mso-no-proof: yes">9 }</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行结果：</SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent">
<DIV>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US><FONT face="Times New Roman">ABCDEF</FONT></SPAN></P></DIV></TD></TR></TBODY></TABLE></SPAN></P></div>]]></description>
	    <author><![CDATA[阿巴睇]]></author>
	    <comments>http://cgbluesky.blog.163.com/blog/static/24123558200842311354144</comments>
    <slash:comments>5</slash:comments>
    <guid isPermaLink="true">http://cgbluesky.blog.163.com/blog/static/24123558200842311354144</guid>
    <pubDate>Fri, 23 May 2008 13:13:54 +0800</pubDate>
    <dcterms:modified>2008-05-23T13:40:57+08:00</dcterms:modified>
  </item>    
 </channel>
</rss>