資源簡介
算法精解:C語言描述一書中的源代碼,學習C語言各種數(shù)據(jù)結(jié)構(gòu)很有幫助。

代碼片段和文件信息
/*****************************************************************************
*????????????????????????????????????????????????????????????????????????????*
*??ex-1.c????????????????????????????????????????????????????????????????????*
*??======????????????????????????????????????????????????????????????????????*
*????????????????????????????????????????????????????????????????????????????*
*??Description:?Illustrates?using?a?binary?search?tree?(see?Chapter?9).??????*
*????????????????????????????????????????????????????????????????????????????*
*****************************************************************************/
#include?
#include?
#include?
#include?“bistree.h“
/*****************************************************************************
*????????????????????????????????????????????????????????????????????????????*
*??Define?the?size?of?strings.???????????????????????????????????????????????*
*????????????????????????????????????????????????????????????????????????????*
*****************************************************************************/
#define????????????STRSIZ????????????????6
/*****************************************************************************
*????????????????????????????????????????????????????????????????????????????*
*??----------------------------?preorder_tree?-----------------------------??*
*????????????????????????????????????????????????????????????????????????????*
*****************************************************************************/
static?void?preorder_tree(const?BiTreeNode?*node)?{
/*****************************************************************************
*????????????????????????????????????????????????????????????????????????????*
*??Display?the?binary?search?tree?rooted?at?the?specified?node.??????????????*
*????????????????????????????????????????????????????????????????????????????*
*****************************************************************************/
if?(!bitree_is_eob(node))?{
???fprintf(stdout?“Node=%s?%+2d?hidden=%d\n“?(char?*)((AvlNode?*)
??????bitree_data(node))->data?((AvlNode?*)bitree_data(node))->factor
??????((AvlNode?*)bitree_data(node))->hidden);
???if?(!bitree_is_eob(bitree_left(node)))
??????preorder_tree(bitree_left(node));
???if?(!bitree_is_eob(bitree_right(node)))
??????preorder_tree(bitree_right(node));
}
return;
}
/*****************************************************************************
*????????????????????????????????????????????????????????????????????????????*
*??------------------------------?compare_str?-----------------------------??*
*????????????????????????????????????????????????????????????????????????????*
*****************************************************************************/
static?int?compare_str(const?void?*str1?const?void?*str2)?{
int????????????????retval;
/**********************************************
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2627??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\contents
?????文件???????4849??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\bistree\bistree.mak
?????文件??????13157??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\bistree\ex-1.c
?????文件???????4749??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\bit\bit.mak
?????文件???????5782??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\bit\ex-1.c
?????文件???????4758??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\bitree\bitree.mak
?????文件??????11786??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\bitree\ex-1.c
?????文件????????110??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\checker
?????文件???????4839??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\chtbl\chtbl.mak
?????文件???????8649??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\chtbl\ex-1.c
?????文件???????4741??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\clist\clist.mak
?????文件???????5363??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\clist\ex-1.c
?????文件???????3535??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\clist\ex-2.c
?????文件???????4829??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\clist\page.mak
?????文件???????5115??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\compress\compress.mak
?????文件???????6001??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\compress\ex-1.c
?????文件???????5983??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\compress\sample.txt
?????文件???????4746??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\dlist\dlist.mak
?????文件???????6604??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\dlist\ex-1.c
?????文件???????4917??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\encrypt\cbc.mak
?????文件???????4921??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\encrypt\encrypt.mak
?????文件???????4830??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\encrypt\ex-1.c
?????文件???????3092??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\encrypt\ex-2.c
?????文件??????15059??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\geometry\ex-1.c
?????文件???????2538??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\geometry\ex-2.c
?????文件???????4853??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\geometry\geodist.mak
?????文件???????5022??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\geometry\geometry.mak
?????文件???????5082??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\graph\bfs.mak
?????文件???????5001??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\graph\dfs.mak
?????文件??????13796??2000-05-16?07:17??[中譯本][算法精解:C語言描述]源代碼\[中譯本][算法精解:C語言描述]源代碼\examples_pc\examples\graph\ex-1.c
............此處省略351個文件信息
評論
共有 條評論