AQA A Level · Computer Science 7517

樹的遍歷:练习题

5 道选择题即时批改,另有 5 道文字题附完整解题步骤,全部围绕「樹的遍歷」。

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

Which tree-traversal algorithm would be most appropriate to use if you wanted to create a complete copy of a binary tree structure?

第 2 题
1

Which of the following describes the correct sequence of operations for a pre-order traversal of a rooted binary tree?

第 3 题
1

A binary tree is traversed and produces the following outputs:
Pre-order: F, B, A, D, C, E, G, I, H
In-order: A, B, C, D, E, F, G, H, I

What is the post-order traversal of this tree?

第 4 题
1

When performing an in-order traversal on a binary search tree (BST) containing numeric values, in what order will the contents be processed?

第 5 题
1

Which of the following describes a scenario where post-order traversal is essential for the correct operation of an algorithm?

第 6 题
2

What is one specific practical application of performing a Pre-order traversal on a rooted tree structure?

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

第 7 题
3

When performing an In-order traversal on a Binary Search Tree (BST) containing integer values, what is the characteristic property of the resulting output sequence?

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

第 8 题
5

A binary tree is used to represent a file directory system. Which traversal method would be used to delete a directory only after all of its sub-directories and files have been deleted?

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

第 9 题
4

A rooted tree is used to represent an arithmetic expression: \( (8 - 3) \times (4 + 2) \).

(a) Describe how an In-order traversal of this expression tree would look, including the placement of brackets.
(b) Perform a Post-order traversal on the tree and state the resulting sequence.
(c) Explain the relationship between the result of a post-order traversal and Reverse Polish Notation (RPN).

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

第 10 题
5

Consider a binary search tree (BST) where nodes are traversed using different methods.

(a) List the steps for an In-order traversal.
(b) Explain why an In-order traversal is particularly useful for a BST compared to other trees.
(c) Describe a practical use for Pre-order traversal.

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

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

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

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

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

立即练习