Oxford AQA International A-level · Computer Science (9645)

Arrays and lists: แบบฝึกหัด

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

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

Which of the following describes a significant disadvantage of using a dynamic list instead of a static array when the total number of elements to be stored is fixed and known at compile time?

ข้อ 2
1 คะแนน

A two-dimensional array \( \text{Grid}[5][10] \) is stored in row-major order in memory. The base address of the array is \( 1000 \) and each integer element occupies \( 4 \) bytes. Using 0-based indexing, what is the memory address of the element located at \( \text{Grid}[2][3] \)?

ข้อ 3
1 คะแนน

When comparing a static array to a dynamic list, which of the following is a characteristic specific to a static array?

ข้อ 4
1 คะแนน

Consider a dynamic list structure implemented using an underlying array. If the list is currently at its maximum capacity, what is the worst-case time complexity for a single append operation?

ข้อ 5
1 คะแนน

When comparing a two-dimensional static array to a list of lists (as implemented in Python), which statement accurately describes their physical storage in memory?

ข้อ 6
3 คะแนน

Explain one reason why a dynamic list might be less memory-efficient than a static array when storing the same number of data items.

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

ข้อ 7
6 คะแนน

Describe the sequence of actions that occurs at the memory level when an element is appended to a dynamic array that has reached its maximum current capacity.

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

ข้อ 8
3 คะแนน

In a two-dimensional array or a list of lists, describe how a specific element is located by the computer during an access operation.

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

ข้อ 9
4 คะแนน

A programmer is working with a one-dimensional static array named Scores containing 6 elements.

(a) Explain the difference between the index of an element and its data content.
(b) Describe the logic required to reverse the elements within the array Scores without using a second array. Identify the role of a temporary variable in this process.

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

ข้อ 10
6 คะแนน

A two-dimensional array \( \text{Data}[6][8] \) is stored in column-major order in memory, starting at the base address of \( 5000 \). Each element in the array is a real data type, which occupies \( 8 \) bytes of storage.

(a) Calculate the memory address of the element located at \( \text{Data}[3][5] \). Assume 0-based indexing is used and show your working.
(b) Explain why the calculation for column-major order differs from the calculation for row-major order.

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

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

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

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

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

เริ่มฝึกเลย