OCR H446 · Component 02 · Algorithms and programming
2.3.1 Algorithms
Analyse complexity, trace searches and sorts, manipulate data structures and compare shortest-path algorithms.
What to revise
Practise algorithms.
Start with these questions from the algorithms topic pack. In the workspace, explain each idea from memory, compare your reasoning with the feedback, then revisit the concepts that need practice.
Use the pack alongside your OCR H446 algorithms and programming revision. Your self-reported confidence helps plan the next review; it is not an exam mark or predicted grade.
- A binary tree has root M; M's left child is F and right child T; F has children C and H; T has left child R only. Give post-order and breadth-first traversals.Trace
- A bounded stack uses indices 0-3; top is the index of its top item and -1 means empty. Give pseudocode to push value v without overflowing.Write
- Perform one left-to-right pass of ascending bubble sort on [17,5,12,3], comparing adjacent pairs in order.Trace
- In a singly linked list, previous points to a node before target; target is not the first node. Give the link update to remove target and explain whether values shift.Write
- What should be established before designing an algorithm for a scenario?Design
- Why trace an algorithm with empty, one-item and boundary-value inputs?Testing
RecallStride is independently produced and is not endorsed by OCR. OCR is a registered trademark of OCR. Topic content is published by its owner and has not yet had an independent academic review.