Pearson Edexcel IGCSE · Computer Science

演算法設計、解讀與追蹤:練習題

5 條多項選擇題即時批改,另有 4 條文字題附完整解題步驟,全部圍繞「演算法設計、解讀與追蹤」。

9 條題目24 免費,無需登記
第 1 題
1

A developer needs to search for a specific name in a sorted list of 10,000 entries. Why would they choose a binary search instead of a linear search?

第 2 題
1

How many times will the total variable be incremented in the following nested loop structure?
FOR \(i\) FROM 1 TO 4
  FOR \(j\) FROM 1 TO 3
    SET \(total\) TO \(total + 1\)
  ENDFOR
ENDFOR

第 3 題
1

Which of these is the primary purpose of using a trace table during the development of an algorithm?

第 4 題
1

What is the maximum number of comparisons a binary search algorithm would need to find a value in a sorted list of \(15\) elements?

第 5 題
1

Given the list \([5, 2, 8, 1]\), what will the list look like after the first complete pass of a standard ascending bubble sort?

第 6 題
3

State the specific requirement that must be met by a data set before a binary search algorithm can be successfully performed.

先自己寫一次答案,再對照解題步驟。

第 7 題
5

A sorted list contains 1,000 items. Determine the maximum number of comparisons required to find an item using a binary search and briefly justify your answer using powers of 2.

先自己寫一次答案,再對照解題步驟。

第 8 題
4

A list of 1,000 student IDs is stored in an array. The IDs are already sorted in ascending order.
(a) State which search algorithm would be more efficient to find a specific ID in this sorted list.
(b) Explain why this algorithm is more efficient than a linear search by comparing the maximum number of checks required for each method.

先自己寫一次答案,再對照解題步驟。

第 9 題
7

An array contains the following sequence of integers: [12, 5, 8, 2].
(a) Show the state of the array after each complete pass of a Bubble Sort algorithm until the numbers are in ascending order.
(b) Explain why a Merge Sort is generally considered more efficient than a Bubble Sort for very large datasets.

先自己寫一次答案,再對照解題步驟。

* thinka提供的內容由AI生成,可能並非總是準確或最新。請將其用作輔助資源,並與官方材料進行核實。

你已看過標準答案,接下來輪到批改你的答案。

這一頁可以告訴你好答案的樣子,卻無法指出你的答案欠缺什麼。thinka 按真實評分準則批改你的文字答案,約 15 秒完成。

想多做幾條同類題目?立即開始練習呢個課題,即做即批改。

立即練習