Graph traversals: Depth-First Search (DFS using stack/recursion), Breadth-First Search (BFS using queue).
š” Worked Example Question
Exam-Style Question
Question:
Trace a binary search for target 18 in array [2, 5, 8, 12, 16, 18, 24, 30].
Model Solution & Mark Scheme:
Array length 8, indices 0..7.
1. mid = (0+7)//2 = 3 (val = 12). 18 > 12 => search right half [4..7].
2. mid = (4+7)//2 = 5 (val = 18). 18 == 18 => Target found at index 5. (2 comparisons total).
ā Practice Questions & Mark Schemes
Q1: Explain the significance of Data Structures, Algorithms and Complexity in A-Level examination contexts.
Show Model Answer
Answer: Demonstrate clear conceptual understanding of Data Structures, Algorithms and Complexity, defining core terminology and citing relevant principles or case examples.
Q2: Evaluate key arguments or methodologies concerning Data Structures, Algorithms and Complexity.
Show Model Answer
Answer: Contrast competing perspectives, discuss empirical evidence or theoretical limitations, and synthesize a balanced, well-reasoned conclusion.