跳到主要内容

title: "评分标准模式"

评分标准模式

Pattern 1 — Define / Explain Dictionary

Scoring breakdown (4 marks)

M1: States dictionary stores (key, value) pairs. (1 mark)

A1: Explains each key is unique. (1 mark)

A1: Explains value is retrieved by key (not by index). (1 mark)

A1: Mentions at least two operations: add, get, remove, contains. (1 mark)


Pattern 2 — Pseudocode Implementation

Scoring breakdown (6 marks)

M1: Correct declaration of data structures (parallel arrays OR linked list nodes). (1 mark)

M1: Correct loop to search for key. (1 mark)

M1: Correct comparison keys[i] = key (or node.key = key). (1 mark)

A1: Correct return / update of value when key found. (1 mark)

A1: Correct "not found" handling — append new pair OR return null. (1 mark)

A1: Index / pointer management is correct throughout. (1 mark)


Pattern 3 — Time Complexity

Scoring breakdown (3 marks)

M1: Correct complexity stated (e.g. O(n) for get on array). (1 mark)

A1: Correct justification — "must search through all elements in worst case". (1 mark)

A1: Distinguishes between different operations if asked. (1 mark)


Pattern 4 — Compare Dictionary with Other ADTs

Scoring breakdown (4 marks)

M1: States dictionary uses key-value pairs / array uses indices. (1 mark)

A1: States dictionary keys can be any data type / array indices are integers. (1 mark)

A1: States dictionary is more flexible for lookup by meaning. (1 mark)

A1: States array may be faster for positional access. (1 mark)