Cambridge International A Level · Computer Science (9618)

Algorithm Design and Problem-solving: แบบฝึกหัด

ข้อปรนัย 5 ข้อ ตรวจให้ทันทีที่ตอบ และข้อเขียน 5 ข้อ พร้อมวิธีทำละเอียด ทั้งหมดจากเรื่อง Algorithm Design and Problem-solving

10 ข้อ24 คะแนนฟรี ไม่ต้องสมัคร
ข้อ 1
1 คะแนน

In the context of computational thinking, which process involves breaking a complex problem into smaller, more manageable sub-problems to simplify the development of a solution?

ข้อ 2
1 คะแนน

Which statement best describes the relationship between decomposition and stepwise refinement in problem-solving?

ข้อ 3
1 คะแนน

A developer is evaluating the efficiency of a procedure that processes a square matrix of size \( n \times n \). The procedure is divided into two sequential phases:

Phase 1: A nested loop structure iterates through all the lower triangular elements of the matrix (where the row index is greater than or equal to the column index) to perform a calculation on each element.
Phase 2: A separate loop runs \( n \) times, where each iteration performs a binary search on a sorted 1D array of size \( n \).

Which of the following correctly identifies the overall worst-case time complexity of the procedure in Big O notation?

ข้อ 4
1 คะแนน

Which of the following statements best describes the primary purpose of abstraction when designing a computational solution to a real-world problem?

ข้อ 5
1 คะแนน

A bubble sort algorithm is being used to sort the following array of integers in ascending order:

[15, 4, 10, 2, 7]

What will be the state of the array after the first complete pass is finished?

ข้อ 6
2 คะแนน

Identify the basic programming construct that allows an algorithm to follow different paths of execution based on the result of a condition, and name the pseudocode statement used for multi-way selection.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 7
4 คะแนน

Compare the best-case time complexity of a bubble sort algorithm with a linear search algorithm, using Big O notation, assuming the data is already sorted.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 8
5 คะแนน

Compare the time complexity of a linear search and a binary search using Big O notation, and state the essential requirement for a binary search to be performed on a dataset.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 9
3 คะแนน

A software developer is tasked with creating a new library management system. To manage the complexity, the developer uses various computational thinking techniques.

a) Define the term decomposition and explain how it helps the developer in this specific scenario.
b) Describe the process of stepwise refinement and state how it differs from decomposition.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 10
5 คะแนน

A 1D array DataList contains the values: [15, 9, 23, 2, 8].
a) Show the state of the array after the second complete pass of a Bubble Sort algorithm (ascending order).
b) Explain the term Stepwise Refinement and how it relates to the design of an algorithm.
c) State the time complexity of the bubble sort in the best-case scenario and explain why this occurs if an optimization flag is used.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

* เนื้อหาของ thinka สร้างโดย AI อาจไม่ถูกต้องสมบูรณ์ในทุกกรณี กรุณาใช้เป็นสื่อเสริมและตรวจสอบกับเอกสารอ้างอิงอย่างเป็นทางการ

คุณเห็นเฉลยแล้ว ทีนี้มาตรวจคำตอบของคุณบ้าง

หน้านี้บอกได้ว่าคำตอบที่ดีเป็นอย่างไร แต่บอกไม่ได้ว่าคำตอบของคุณขาดอะไร thinka ตรวจข้อเขียนของคุณตามเกณฑ์ให้คะแนนจริงในราว 15 วินาที

อยากฝึกโจทย์แบบนี้เพิ่มไหม เริ่มฝึกหัวข้อนี้ได้เลย ตรวจให้ทันทีทุกข้อ

เริ่มฝึกเลย