Cambridge International AS Level · Computer Science (9618)

Data Types and Structures:練習問題

その場で採点される選択問題 5 問と、解説つきの記述問題 5 問。すべて「Data Types and Structures」からの出題です。

10 問25 無料・登録不要
問 1
1

Which of the following describes the fundamental property of an Abstract Data Type (ADT)?

問 2
1

A 1D array Arr contains 8 elements. During a bubble sort (ascending), the following comparisons are made in the first pass:
\(Arr[1]\) vs \(Arr[2]\), \(Arr[2]\) vs \(Arr[3]\), ..., \(Arr[7]\) vs \(Arr[8]\).

If the array is [12, 5, 8, 1, 15, 7, 3, 10], what is the value of the element at index 8 after the completion of the first pass?

問 3
1

A queue is implemented using a 1D array of size 10, named MyQueue, with two pointers: HeadPointer (points to the first element) and TailPointer (points to the last element added).

If the queue is currently empty and HeadPointer is 0, what are the values of the pointers after three elements are added (ENQUEUE) and then one element is removed (DEQUEUE)? (Assume the first index is 0)

問 4
1

In pseudocode, which data type is most appropriate for a variable that must only store the value TRUE or FALSE?

問 5
1

In a linked list, what is the specific purpose of a null pointer?

問 6
2

A 1D array named TemperatureData contains 365 real numbers representing daily recordings. Identify the technical term used to refer to the individual position of a specific value within this array, and state the typical data type used for this purpose.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 7
3

A programmer needs to store the results of a science experiment where 50 different sensors each record a temperature reading at 10 distinct time intervals throughout the day.

Identify the most appropriate data structure to store all these readings and state the total number of elements it would contain.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 8
5

A programmer is implementing a Linked List using two 1D arrays: DataArray and PointerArray. Currently, the list contains three names in the following logical order: "Alpha", "Beta", "Gamma".

Assume "Alpha" is stored at index 3 and "Beta" is stored at index 1. Describe the value that must be stored in PointerArray[3] and explain why this value is necessary to maintain the linked structure.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 9
5

A programmer needs to store a set of related data for a library's digital catalog. Each book entry requires a unique ID number, the title of the book, the date it was last borrowed, and a flag indicating if it is currently available.

(a) Define a composite data type named BookRecord in pseudocode to store these four pieces of data. (3 points)

(b) State the most appropriate primitive data type for each field defined in part (a). (2 points)

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 10
5

Abstract Data Types (ADTs) can be implemented using existing data structures.

(a) Describe how a Stack ADT behaves differently from a Queue ADT when removing items. (2 points)

(b) A linear array Q[1:10] is used to implement a queue. Explain the logic of a Circular Queue and why it is more efficient than a simple linear queue for this array. (3 points)

まず自分で答えを書いてから、解説と照らし合わせましょう。

※ thinkaのコンテンツはAIにより生成されているため、内容が正確でない場合があります。補助教材としてご使用いただき、公式の教材と合わせてご確認ください。

模範解答は見ました。次はあなたの答案を採点します。

このページは良い答案の形を示せますが、あなたの答案に何が足りないかは教えられません。thinka は実際の採点基準に沿って記述答案を約 15 秒で採点します。

同じような問題をもっと解きたい?このトピックの新しい問題を、解きながら採点。

練習を始める