上一页 1 ··· 4 5 6 7 8
摘要: //非递归操作 #include <stdio.h> #include <stdlib.h> #define MaxSize 200 typedef struct TreeNode{ int data; struct TreeNode *lchild,*rchild; }TreeNode,*Tree 阅读全文
posted @ 2023-08-14 10:24 四马路弗洛伊德 阅读(47) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> typedef struct TNode{ int data; struct TNode *lchild,*rchild; }TreeNode,*Tree; /* 在这段代码中,递归函数 `CreateTree` 在执行 阅读全文
posted @ 2023-08-14 10:23 四马路弗洛伊德 阅读(57) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #define MaxSize 100 typedef struct TreeNode{ int data; struct TreeNode *lchild,*rchild; }TreeNode,*Tree; typede 阅读全文
posted @ 2023-08-14 10:23 四马路弗洛伊德 阅读(50) 评论(0) 推荐(0)
摘要: 1、代码实现(递归) 1 #include <stdio.h> 2 //应注意的是此时的排序仅仅是逻辑地址的改变 3 //实际的存储地址仍是原先顺序 4 5 int Partition(int arr[],int low,int high) 6 { 7 int pivot=arr[low]; //基 阅读全文
posted @ 2023-07-09 19:11 四马路弗洛伊德 阅读(2) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8