PTA
文章平均质量分 75
鄜州与月
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
If a general tree T is converted into a binary tree BT, then which of the following BT...
If a general tree T is converted into a binary tree BT, then which of the following BT traversals gives the same sequence as that of the post-order traversal of T?答案:inorder traversal【解析】普通树(general tree)转化为二叉树(binary tree)具体可以看普通树转二叉树其实就是节点p的左儿子a还是左原创 2021-11-16 00:30:26 · 3937 阅读 · 0 评论 -
数据结构基础(关于heap的一些问题总结)ZJU-DS-HQM2021-WK6
知识点参考网站:https://www.cnblogs.com/embedded-linux/p/7302390.htmlheap概述堆(Heap)是计算机科学中一类特殊的数据结构的统称,堆通常是一个可以被看做一棵树的数组对象。1、堆是一棵完全二叉树;2、堆中的某个结点的值总是大于等于(最大堆)或小于等于(最小堆)其孩子结点的值。3、堆中每个结点的子树都是堆树。最大堆max-heap:每个节点的键值(key)都大于或等于其子节点键值最小堆min-heap:每个节点的键值(key)都小于或等于原创 2021-11-04 22:19:31 · 3371 阅读 · 0 评论 -
(数据结构基础)Among the following threaded binary trees (the threads are represented by dotted curves),……
当年学这些的时候真的是苦于没有人讲,现在复习考研,我会见到这种题就写下来,学弟学妹们欢迎点个关注,最近也在创业想实习的可以找我联系;没看懂的话是我表述有问题,欢迎指出和私戳。Among the following threaded binary trees (the threads are represented by dotted curves), which one is the postorder threaded tree?答案B(见下图)分析线索二叉树(threaded )的目的和使用方原创 2021-10-26 00:48:27 · 4471 阅读 · 0 评论 -
Given a binary search tree with its preorder traversal sequence { 8, 2, 15, 10, 12, 21 }.…
题目Given a binary search tree with its preorder traversal sequence { 8, 2, 15, 10, 12, 21 }. If 8 is deleted from the tree, which one of the following statements is FALSE? (3分)A. One possible preprder traversal sequence of the resulting tree may be { 2, 1原创 2021-10-25 17:39:07 · 2261 阅读 · 0 评论 -
Bonus-1 One Way In, Two Ways Out (20 分)
Bonus-1 One Way In, Two Ways Out (20 分)题干Consider a special queue which is a linear structure that allows insertions at one end, yet deletions at both ends. Your job is to check, for a given insertion sequence, if a deletion sequence is possible. For exa原创 2021-10-17 01:09:21 · 1347 阅读 · 1 评论 -
7-1 Pop Sequence (6 分)
7-1 Pop Sequence (6 分)题干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 supposed to tell if a given sequence of numbers is a possible pop sequence of the stack. For example, if M is 5原创 2021-10-17 01:00:43 · 1690 阅读 · 0 评论 -
PTA File Transfer (8 分) (数据结构)(C语言)
(浙江大学数据结构)题目:File Transfer (8 分)We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer to another. Is it possibl...原创 2019-11-13 18:14:49 · 564 阅读 · 0 评论 -
(浙江大学数据结构)PTA Complete Binary Search Tree (10 分)
题目:A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The ...原创 2019-11-12 14:06:03 · 1038 阅读 · 0 评论
分享