§1 Core structures
| Structure | Order / shape | Typical costs |
|---|---|---|
| Array | Contiguous, indexed | Access O(1); insert in middle O(n) |
| Linked list | Nodes with next pointers | Insert at head O(1); search O(n) |
| Stack | LIFO | push/pop O(1) |
| Queue | FIFO | enqueue/dequeue O(1) |
| Binary search tree | Left < node < right | Search O(log n) if balanced, O(n) worst case |
| Hash table | Key → bucket | Average O(1) lookup |
§2 Tree traversals
§3 Searching and sorting
§4 Worked examples
Example 1
Evaluate the postfix expression 6 2 / 3 +.
- Push 6, push 2.
- '/' pops 2 and 6 → 6 / 2 = 3; push 3.
- Push 3. '+' pops → 3 + 3 = 6.
Answer 6
! Common traps
- Popping operands in the wrong order for − and /.
- Running binary search on unsorted data.
Coverage source: 2023 ICT Proficiency Certification Examination FAQs (file dated 14 Feb 2023) (third-party copy)