摘要: # include # include struct BTNode { char data; struct BTNode * pLchild; //p是指针 L是左 child是孩子 struct BTNode * pRchild; }; void PostTraverseBTree(struct BTNode * pT); struct BTNode * Cr... 阅读全文
posted @ 2018-09-17 22:18 简简单单zjl 阅读(1902) 评论(0) 推荐(0) 编辑
摘要: public class QSDemo { public static void main(String[] args) { int arr[]={6,2,1,7,3,0,9,8,5,4}; quickSort(arr,0,arr.length-1); for(int i=0;i=arr[low]) ... 阅读全文
posted @ 2018-09-12 11:56 简简单单zjl 阅读(173) 评论(0) 推荐(0) 编辑
摘要: # include # include struct BTNode { char data; struct BTNode * pLchild; //p是指针 L是左 child是孩子 struct BTNode * pRchild; }; void PostTraverseBTree(struct BTNode * pT); struct BTNode * Cr... 阅读全文
posted @ 2018-09-11 20:22 简简单单zjl 阅读(212) 评论(0) 推荐(0) 编辑
摘要: # include void hannuota(int n, char A, char B, char C) { /* 如果是1个盘子 直接将A柱子上的盘子从A移到C 否则 先将A柱子上的n-1个盘子借助C移到B 直接将A柱子上的盘子从A移到C 最后将B柱子上的n-1个盘子借助A移到C */ if (1 ... 阅读全文
posted @ 2018-09-11 20:21 简简单单zjl 阅读(220) 评论(0) 推荐(0) 编辑
摘要: # include //假定n的值是1或大于1的值 long f(long n) { if (1 == n) return 1; else return f(n-1) * n; } int main(void) { printf("%ld\n", f(100)); return 0; } 阅读全文
posted @ 2018-09-11 20:20 简简单单zjl 阅读(3376) 评论(0) 推荐(0) 编辑
摘要: # include # include typedef struct Queue { int * pBase; int front; int rear; }QUEUE; void init(QUEUE *); bool en_queue(QUEUE *, int val); //入队 void traverse_queue(QUEUE *); bool fu... 阅读全文
posted @ 2018-09-11 20:20 简简单单zjl 阅读(139) 评论(0) 推荐(0) 编辑
摘要: # include long sum(int n) { if (1 == n) return 1; else return n + sum(n-1); } int main(void) { printf("%ld\n", sum(100)); return 0; } 阅读全文
posted @ 2018-09-11 20:19 简简单单zjl 阅读(2927) 评论(0) 推荐(0) 编辑
摘要: # include int FindPos(int * a, int low, int high); void QuickSort(int * a, int low, int high); int main(void) { int a[6] = {-2, 1, 0, -985, 4, -93}; int i; QuickSort(a, 0, 5); //第二个参数... 阅读全文
posted @ 2018-09-11 20:17 简简单单zjl 阅读(500) 评论(0) 推荐(0) 编辑
摘要: 姓名: 阅读全文
posted @ 2018-08-21 17:04 简简单单zjl 阅读(1243) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-08-21 16:37 简简单单zjl 阅读(10496) 评论(1) 推荐(1) 编辑