摘要:
题目:https://pintia.cn/problem-sets/1268384564738605056/problems/1278908289143574530 In 1953, David A. Huffman published his paper "A Method for the Con 阅读全文
摘要:
题目:https://pintia.cn/problem-sets/1268384564738605056/problems/1278908289143574529 We have a network of computers and a list of bi-directional connect 阅读全文
摘要:
题目:https://pintia.cn/problem-sets/1268384564738605056/problems/1278908289143574528 将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。 输入格式: 每组测试第1行包含 阅读全文
摘要:
题目:https://pintia.cn/problem-sets/1268384564738605056/problems/1276814005115539458 A Binary Search Tree (BST) is recursively defined as a binary tree 阅读全文
摘要:
题目:https://pintia.cn/problem-sets/1268384564738605056/problems/1276814005115539457 An AVL tree is a self-balancing binary search tree. In an AVL tree, 阅读全文
摘要:
题目:https://pintia.cn/problem-sets/1268384564738605056/problems/1276814005115539456 给定一个插入序列就可以唯一确定一棵二叉搜索树。然而,一棵给定的二叉搜索树却可以由多种不同的插入序列得到。例如分别按照序列{2, 1, 阅读全文
摘要:
题目: https://pintia.cn/problem-sets/1268384564738605056/problems/1274008636207132674 An inorder binary tree traversal can be implemented in a non-recur 阅读全文
摘要:
题目: https://pintia.cn/problem-sets/1268384564738605056/problems/1274008636207132673 Given a tree, you are supposed to list all the leaves in the order 阅读全文
摘要:
题目:https://pintia.cn/problem-sets/1268384564738605056/problems/1274008636207132672 给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。例如图1给出的两棵树就是同构的,因为我 阅读全文
摘要:
题目: https://pintia.cn/problem-sets/1268384564738605056/problems/1271415149946912771 Given a stack which can keep M numbers at most. Push N numbers in 阅读全文