上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 36 下一页
摘要: 04-树5 Root of AVL Tree (25分) An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node dif 阅读全文
posted @ 2020-07-22 00:49 余生以学 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 04-树4 是否同一棵二叉搜索树 (25分) 给定一个插入序列就可以唯一确定一棵二叉搜索树。然而,一棵给定的二叉搜索树却可以由多种不同的插入序列得到。例如分别按照序列{2, 1, 3}和{2, 3, 1}插入初始为空的二叉搜索树,都得到一样的结果。于是对于输入的各种插入序列,你需要判断它们是否能生成 阅读全文
posted @ 2020-07-19 22:10 余生以学 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 03-树3 Tree Traversals Again (25分) An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that w 阅读全文
posted @ 2020-07-19 20:16 余生以学 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 03-树1 树的同构 (25分) 给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。例如图1给出的两棵树就是同构的,因为我们把其中一棵树的结点A、B、G的左右孩子互换后,就得到另外一棵树。而图2就不是同构的。 图1 图2 现给定两棵树,请你判断它们是否是 阅读全文
posted @ 2020-07-05 23:40 余生以学 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 02-线性结构4 Pop Sequence (25分) Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are s 阅读全文
posted @ 2020-07-05 21:23 余生以学 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 栈(Stack)顺序存储C语言实现 //栈--线性表实现 #define ERROR -1 typedef int Position; typedef int ElemType; struct SNode{ ElemType *Data; Position Top; int MaxSize; }; 阅读全文
posted @ 2020-07-05 18:25 余生以学 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 02-线性结构3 Reversing Linked List (25分) Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. Fo 阅读全文
posted @ 2020-07-04 21:59 余生以学 阅读(336) 评论(0) 推荐(0) 编辑
摘要: RUNTIME_CLASS、DECLARE_DYNAMIC、DECLARE_DYNCREATE、DECLARE_SERIAL宏定义 RUNTIME_CLASS( class_name ) 【参数】 class_name:类的实际名字(不用引号括起来)。 【说明】 利用这个宏通过C++类的名字获得一个 阅读全文
posted @ 2020-06-03 13:27 余生以学 阅读(472) 评论(0) 推荐(0) 编辑
摘要: Git设置HTTP/HTTPS代理服务器 git config --global http.proxy http://localhost:port git config --global https.proxy https://localhost:port 其中,localhost为服务器地址,po 阅读全文
posted @ 2020-05-31 11:32 余生以学 阅读(3054) 评论(0) 推荐(0) 编辑
摘要: 队列(Queue))顺序存储C语言实现 #define ERROR -1 typedef int ElemType; typedef int Position; typedef struct QNode* Queue; typedef struct QNode{ ElemType*data; Pos 阅读全文
posted @ 2020-05-03 10:31 余生以学 阅读(781) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 36 下一页