A2 COMP3 algorithms and data structure