Auckland · COMPSCI220 · Algorithms and Data Structures

COMPSCI220: pass the exams, not just read the notes

Your complete guide to University of Auckland's algorithms and data structures course. See where the marks are, work real practice questions, and study with an AI tutor that knows COMPSCI220.

15 credit points Stage II (second-year undergraduate) Offered S1 / S2 ~85% exams School of Computer Science

Sia generates COMPSCI220 practice questions, works through them step by step, and quizzes you on the material the exam weights most heavily.

Spot the bug

Find what is wrong

Multiple choice · the fix is revealed after you answer

What is the worst-case time complexity of merge sort on an array of n elements?

The fix

Merge sort splits the array in half each time, giving a recursion depth of log n levels.

At each level the merge step touches all n elements, costing O(n).
Total work is O(n) per level times log n levels.
So the worst-case running time is O(n log n) — unlike quicksort, merge sort has no O(n^2) worst case.

The trap: Confusing merge sort with quicksort. Quicksort degrades to O(n^2) in the worst case on bad pivots; merge sort is O(n log n) in the worst case because its split is always balanced. classic slip!

your whole grade
Where your grade comes from Exams 85% · Assignment 10% · Participation 5%

One exam decides 50% of your grade. Must pass theory and practical separately, plus overall pass. This whole page is built around that.

Overview

What COMPSCI220 is, and where it sits

COMPSCI220 Algorithms and Data Structures is a Stage II course at the University of Auckland and a compulsory core for the Computer Science major. It covers how to design algorithms and reason rigorously about them: algorithm analysis and running time, worst- and average-case behaviour, sorting algorithms (selection, insertion, merge, quicksort) and the sorting lower bound, recurrences, and the core data structures built over trees such as binary heaps and search trees, along with graphs and hashing.

The course is analytical and proof-aware, not just implementation. A 50% final exam and two 17.5% tests dominate the grade, supported by written and programming assignments, with a dual-pass hurdle requiring you to pass both the theory and the practical parts. The recurring skill is analysing an algorithm's correctness and complexity, not merely coding it.

How it differs from its first-year siblings. COMPSCI220 is the reasoning core of computer science: it moves from writing code to proving how algorithms behave, analysing running time and correctness rather than just implementing a solution.

Official outline: courseoutline.auckland.ac.nz · COMPSCI220 outline. Always treat the official outline and the exam timetable as authoritative.

Difficulty & time commitment

Is COMPSCI220 hard, and how much time does it take?

COMPSCI220 is manageable if you keep a weekly rhythm and treat the back half as the main event. The pattern is consistent: it starts gently and steepens, and the heaviest assessment is the part that separates grades.

Difficulty
3.4 / 5
Moderate–Hard. Gentle early, demanding back half. Hard to fail with steady work; a top grade takes consistent practice.
Exam load
85%
The exams decide most of the grade. The heaviest single component is 50%.
Weekly time
~10 hrs
Around 10 hours per week including class, across lectures, study and assessment.
Weeks 1-5 (analysis, sorting)builds the toolkit
Weeks 6-12 (trees, graphs, hashing)steep

The difficulty curve and the assessment weighting point the same way: the back half is harder and worth more. Front-loading effort there is the highest-return decision in the course.

Is this course for you

Who tends to do well, and who tends to struggle

You will likely do well if

  • You are comfortable with mathematical reasoning, recurrences and Big-O analysis.
  • You practise analysing algorithms (correctness and complexity) by hand, not just coding them.
  • You keep both the theory and practical streams above the pass line (dual-pass hurdle).

You may struggle if

  • You are shaky on the maths prerequisites (logs, summations, recurrences).
  • You treat the course as coding only and skip the correctness and complexity proofs.
  • You fall behind through the steep back half (trees, graphs, hashing).
do this ↘
What top students do differently
  • Build a complexity table for every algorithm (best/average/worst) you can reproduce from memory.
  • Practise solving recurrences and proving running-time bounds, a frequent exam focus.
  • Prepare the allowed A4 cheat sheet for each test deliberately, since notes are restricted.

Syllabus

The 6 topics, topic by topic

The exam-weight marker on each topic shows where the marks concentrate. The amber topics carry the highest exam weight.

T1 · Algorithm analysis and running time

Lower exam weight

T2 · Sorting algorithms

Lower exam weight

T3 · Recurrences and the sorting lower bound

Lower exam weight

T4 · Data structures over trees (heaps, search trees)

Lower exam weight

T5 · Graphs

Lower exam weight

T6 · Hashing

Lower exam weight

How it's assessed

Assessment structure

ComponentWeightFormat & timing
Final exam50%Invigilated (theory). Exam period. Must pass theory and practical separately, plus overall pass.
Test 117%45-min invigilated test; one A4 sheet allowed. Week 5.
Test 218%45-min invigilated test; one A4 sheet allowed. Later semester.
Written + programming assignments10%4 written (1.25% each) + 4 programming (1.25% each). Across semester.
Maths quiz + tutorial presentations5%Maths-prerequisites quiz (1%) + 2 tutorial presentations (2% each). Across semester.
Final exam50%
Invigilated (theory).
Test 117%
45-min invigilated test; one A4 sheet allowed.
Test 218%
45-min invigilated test; one A4 sheet allowed.
Written + programming assignments10%
4 written (1.25% each) + 4 programming (1.25% each).
Maths quiz + tutorial presentations5%
Maths-prerequisites quiz (1%) + 2 tutorial presentations (2% each).
  • Pass on a weighted average of at least 50% unless a hurdle is noted; confirm on the official course page.
read this! If you read nothing else

This is an exam-cram course. With the exams at 85% of the grade and the final exam alone at 50%, your result is overwhelmingly decided by how well you perform under time pressure. Must pass theory and practical separately, plus overall pass.

How to actually pass it

A weekly rhythm, two checklists, and the traps to avoid

The course rewards consistency over cramming, and practice over re-reading. Here is the loop that works, then what to have nailed before each exam.

The weekly loop

Each week
Re-derive the week's algorithm analysis (running time, correctness) by hand.
Per assignment
Complete both written and programming assignments to stay above the practical pass line.
Weekly
Add each algorithm and data structure to a complexity-and-use-case sheet.

Before the mid-semester checklist

Before the final heaviest topics

  • Master sorting algorithms and their complexities, including the sorting lower bound.
  • Drill recurrences and Big-O analysis.
  • Revise trees (heaps, search trees), graphs and hashing for the 50% final.
  • Confirm you are passing both theory and practical (dual-pass hurdle).

The mistakes that cost marks

01

Coding without analysing. The course rewards analysing correctness and complexity, not just implementation. A working program with no analysis misses the marks that matter.

02

Weak maths foundation. Recurrences, logs and summations underpin the analysis; a shaky base makes the back half much harder.

03

Ignoring the dual-pass hurdle. You must pass both theory and practical parts as well as overall; strength in one cannot rescue a fail in the other.

Teaching team

Who teaches COMPSCI220

No teaching staff are publicly listed for this offering. Check the official course page for the current coordinator and lecturers.

Where it fits

Prerequisites, related courses & why it matters

Stage II compulsory core for the Computer Science major at the University of Auckland; assumes prior programming and discrete maths. Check the official course outline for prerequisites.

Why it matters beyond the grade. Algorithms and data structures is the analytical core assumed by every later computer science course and is central to technical interviews and software engineering roles.

FAQ

Frequently asked questions

How is COMPSCI220 assessed at the University of Auckland?

COMPSCI220 has a 50% final exam and two invigilated tests worth 17.5% each (theory), plus practical coursework: a maths-prerequisites quiz (1%), written assignments (5%), programming assignments (5%) and tutorial presentations (4%). There is a dual-pass hurdle — you must pass the theory and practical parts and achieve an overall pass. Confirm details on the official Auckland course outline.

Is COMPSCI220 hard?

It is a moderate-to-hard Stage II course: it is analytical and proof-aware, with exams worth 85% and a dual-pass hurdle. Students strong in maths who practise algorithm analysis by hand generally find it manageable; those who treat it as coding-only tend to struggle.

What does COMPSCI220 cover?

Algorithm analysis and running time, sorting algorithms and the sorting lower bound, recurrences, data structures over trees (binary heaps, search trees), graphs and hashing.

What background do I need?

Prior programming (such as COMPSCI101) and comfort with discrete maths. There is a maths-prerequisites quiz at the start, reflecting how much the analysis relies on that base.

Study COMPSCI220 with Sia

Work through the core topics and the rest of the course with a tutor that knows it and quizzes you on the topics the assessments weight most heavily.

Start studying with Sia