AQA A Level · Computer Science 7517

樹(包括二元樹):练习题

5 道选择题即时批改,另有 5 道文字题附完整解题步骤,全部围绕「樹(包括二元樹)」。

10 道题目25 免费,无需注册
第 1 题
1

Which of the following properties uniquely defines a tree in graph theory terms?

第 2 题
1

Consider a binary tree where every internal node has exactly two children. If the tree has \(n\) leaf nodes, how many internal nodes (including the root) does it have?

第 3 题
1

A binary search tree is constructed by inserting the following keys in order: 50, 30, 70, 20, 40, 60, 80. After these insertions, the key 50 is deleted and replaced by its in-order successor. What is the new root of the tree?

第 4 题
1

In a binary search tree (BST), if we want to output the data values in ascending order, which traversal algorithm should be used?

第 5 题
1

Which statement correctly describes the difference between static and dynamic implementation of a tree data structure?

第 6 题
3

Identify the specific type of tree traversal required to output the contents of a binary search tree in ascending numerical order.

先自己写一遍答案,再对照解题步骤。

第 7 题
5

In graph theory, a tree is defined as a connected, undirected graph with no cycles. If a tree has \( V \) vertices, exactly how many edges must it have, and why would adding one more edge between any two existing vertices violate the tree property?

先自己写一遍答案,再对照解题步骤。

第 8 题
3

Identify the specific tree traversal that would be used to produce a prefix expression from an expression tree and describe the order in which the root and its children are visited.

先自己写一遍答案,再对照解题步骤。

第 9 题
4

A Binary Search Tree (BST) is constructed by inserting the following keys in order: 50, 30, 70, 20, 40, 90.

a. Identify the root node and its immediate left and right children. (1 point)
b. Perform an In-order traversal of this tree and list the resulting sequence. (2 points)
c. Explain why an In-order traversal is particularly useful when applied to a Binary Search Tree. (1 point)

先自己写一遍答案,再对照解题步骤。

第 10 题
5

A binary search tree (BST) is a specific type of tree structure.

(a) Define the mathematical properties of a tree and explain what makes a tree a rooted tree.
(b) Identify the maximum number of children any node can have in a binary tree.
(c) A BST is constructed with the following keys inserted in order: 40, 20, 10, 30, 60, 50, 70. Describe the steps to find the key 50 and state how many comparisons are required.

先自己写一遍答案,再对照解题步骤。

* thinka提供的内容由AI生成,可能并非总是准确或最新。请将其用作辅助资源,并与官方材料进行核实。

你已看过标准答案。现在轮到你的答案被批改。

这一页能告诉你好答案是什么样子,却无法指出你的答案缺了什么。thinka 按真实评分标准批改你的文字答案,约 15 秒完成。

想多做几道同类题目?立即开始练习这个课题,边做边批改。

立即练习