风歌的blog

已搬家到 blog.imxjf.top
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  B.算法与数据结构

摘要:利用了树的中序遍历,不过是从右边到左边的中序遍历。 #include #include "tree.h"templatevoid outputTree(TreeNode *ptr,int totalSpaces){ if(ptr!=0) { outputTree(ptr->rightPtr,totalSpaces+5); for(int i=0;ige... 阅读全文

posted @ 2005-07-14 17:44 风歌 阅读(984) 评论(3) 推荐(0)

摘要:组合的算法 出处:http://community.csdn.net/Expert/topic/3143/3143703.xml?temp=.5916101 原作者:cxjddd (空浮无根) 内容简介: 本文讲述求一种求排列组合中的“组合”的算法。本算法通过组织选入组合的元素和未选入组合的元素之间次序,以方便求得下一个组合——更大的或更小... 阅读全文

posted @ 2005-07-13 18:47 风歌 阅读(1254) 评论(0) 推荐(0)

摘要:#include #include // constant size must be defined as the array size for bucketSort to workconst int SIZE = 12; void bucketSort( int [] );void distributeElements( int [], int [][ SIZE ], int );void ... 阅读全文

posted @ 2005-07-13 18:44 风歌 阅读(670) 评论(1) 推荐(0)