c++
choies
挺好的
展开
-
全排列
#include using namespace std; void swap(int &a,int &b){int t=a;a=b;b=t;}void permutation(char* a,int k,int m) { int i,j; if(k == m) { for(i=0;原创 2016-03-27 19:09:08 · 276 阅读 · 0 评论 -
简单树的创建与遍历
#include#include#includeusing namespace std;typedef char ElemType;typedef struct _Btree{ElemType data;struct _Btree *lp;struct _Btree *rp;}Btree;Btree *_BuyNode(){Btr原创 2016-03-27 19:15:04 · 361 阅读 · 0 评论 -
蛇形矩阵填写二维数组
#include#includeusing namespace std;static int num=0;void write(int a[][100],int col,int row,int start){int endx=col-1-start;int endy=row-1-start;for(int i=start;i{a[start]原创 2016-04-13 11:11:38 · 1269 阅读 · 0 评论