IT5003: ace the component, not just read the notes
Your complete guide to National University of Singapore's data structures and algorithms course. See where the marks are, work real practice questions, and study with an AI tutor that knows IT5003.
Sia generates IT5003 practice questions, walks through course admin and analysis of algorithms step by step, and quizzes you on the material the component that weights most heavily.
Find what is wrong
A student implements a queue for a BFS in Python as follows and finds the traversal slow on a large graph. Which change fixes the performance problem?
queue = [start]
while queue:
u = queue.pop(0)
for v in adj[u]:
if not visited[v]:
visited[v] = True
queue.append(v)
list.pop(0) shifts every remaining element, so each dequeue is O(n) and the whole BFS degrades to O(V²) on a large queue.
Option A turns the queue into a stack, making the traversal depth-first and breaking the shortest-path property.
Option C makes neighbour iteration O(V) per vertex on sparse graphs, worse than an adjacency list. Option D changes correctness (vertices can be enqueued twice), not speed.
The trap: Assuming the Python list is a queue because it has append and pop. The course's list-ADT week is precisely about which operations are O(1) at which end. classic slip!
One component decides 50% of your grade. Open book, no electronic device except one calculator. This whole page is built around that.
Overview
What IT5003 is, and where it sits
IT5003 Data Structures and Algorithms is the Python data-structures course for NUS Master of Computing (General Track) students and other graduate learners who have passed IT5001 or an equivalent programming course. Steven Halim has taught it a dozen times; in S1 AY2026/27 it is a small class with two lab groups, one on Monday afternoon and one on Saturday morning.
The published syllabus is a subset of the undergraduate CS2040S: algorithms on arrays and sorting; list, stack, queue and deque; binary heaps, hash tables and, from AY2026/27, AVL trees alongside binary search trees; graph representations, DFS and BFS, single-source shortest paths and a closing introduction to NP-completeness. It is a flipped classroom: VisuAlgo e-lecture slides are read before class, and class time goes to problems from Kattis and LeetCode.
Assessment in S1 AY2026/27 is 13% Kattis problem sets, 12% VisuAlgo online quizzes, 5% tutorial and lab participation, a 20% open-book midterm in Week 7 and a 50% open-book final. The course page records this year's changes: midterm raised from 16% to 20%, quizzes reduced from 16% to 12%, and lab hours turned into mock coding interviews.
Always treat your own course outline and the exam timetable as authoritative.
Difficulty & time commitment
Is IT5003 hard, and how much time does it take?
IT5003 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.
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 read the VisuAlgo slides before each lecture — the flipped format assumes it.
- You keep pace with the fortnightly Kattis problem sets rather than batching them.
- You can already write clean Python from IT5001 and want to learn why library structures behave as they do.
- You treat the mock-interview labs as practice for the open-book tests.
You may struggle if
- You expect lectures to introduce material from scratch; they discuss problems on the assumption you have read the slides.
- You skip the online quizzes; 12% is spread over three 15-minute sessions.
- You leave graphs, the last four weeks, until the study week.
- Your Python is shaky; the course page recommends strengthening it before the semester.
- Implement each structure yourself once (linked list, heap, hash table, BST) before relying on the Python library.
- Solve the daily LeetCode tasks tied to each week; at least half are discussed in class.
- Bring a one-page summary of graph algorithms into the open-book final.
- Redo the published past midterm and final papers under time.
Syllabus
The 12 topics, week by week
The exam-weight marker on each topic shows where the marks concentrate. The amber topics carry the highest exam weight.
T1 · Course admin and Python review
Week 1Flipped-classroom setup; Kattis PS0; LeetCode programming-skills warm-ups.
T2 · Analysis of algorithms
Week 2Measuring runtime versus counting operations versus asymptotic analysis; O(N²) sorts.
T3 · O(N log N) sorting
Week 3Merge sort, randomised quicksort, Python list.sort and sorted; counting sort preview.
T4 · List ADT
Week 4Singly linked list, stack, queue, deque; Python list and collections.deque.
T5 · Priority queue and binary heap
Week 5Insert, extract-max, create-heap, heapsort; Python heapq.
T6 · Hash tables
Week 6Table ADT, hashing, separate chaining and open addressing; Python set, dict, Counter.
T7 · Midterm and revision
Week 7Past-paper discussion; problem set 4 on hash tables.
T8 · Binary search trees and AVL trees
Week 8BST operations, multisets, balanced BST concepts; no built-in balanced BST in Python.
T9 · Graph data structures and DFS
Week 9Adjacency matrix and list, edge list, implicit graphs; depth-first search.
T10 · Graph traversal applications
Week 10BFS; connected components, flood fill, cycle detection, topological sort, bipartite check.
T11 · Single-source shortest paths
Week 11Bellman-Ford, BFS on unweighted graphs, Dijkstra's algorithm, SSSP on trees and DAGs.
T12 · SSSP applications and NP-completeness
Week 12Shortest-path modelling; the limits of computation; course wrap-up.
How it's assessed
Assessment structure
| Component | Weight | Format & timing |
|---|---|---|
| Kattis problem sets (PS0 1% and PS1-PS6 at 2% each) | 13% | Seven Kattis problem sets: PS0 (any 3 of 10 trivial tasks, 1%) and PS1-PS6 (2% each) on the week's data structure or algorithm. Fortnightly, due Saturday mornings. Continuous assessment. |
| VisuAlgo online quizzes (three at 4% each) | 12% | Three 15-minute VisuAlgo online quizzes at the end of lectures in Weeks 5, 9 and 12 (4% each); bring your own laptop. Weeks 5, 9 and 12. Continuous assessment; make-up window in Week 13. |
| Tutorial and lab participation | 5% | Participation in the weekly tutorial-lab combo, run as mock coding interviews. Weeks 3-12. Continuous assessment. |
| Midterm test (90 minutes, open book) | 20% | 90-minute open-book test on Weeks 1-6 (analysis, sorting, lists, heaps, hash tables). Week 7 (30 Sep 2026). Open book, no electronic device except one calculator. |
| Final assessment (2 hours, open book) | 50% | Two-hour open-book written assessment on the whole course. Examination period (21 Nov 2026). Open book, no electronic device except one calculator. |
- The five components sum to 100 and no separate hurdle is published. Problem sets have fixed Saturday deadlines on Kattis; online quizzes have a single make-up window in Week 13. Both tests are open book with no electronic device except one calculator.
- Midterm: 90 minutes in Week 7 on analysis, sorting, lists, heaps and hash tables; recent midterm papers are published on the course site. Final: two hours across the whole course, with graph topics from the last four weeks expected to dominate; recent final papers are published for the lecturer's own runs.
This is a coursework course. Coursework carries 100% of the grade and the final assessment (2 hours, open book) is the single heaviest piece at 50%, so steady work across the semester decides your result more than any one sitting. Open book, no electronic device except one calculator.
Final exam timing: During the examination period. Confirm the exact date and venue on your exam timetable.
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
Before the mid-semester checklist
- State the time complexity of each sorting algorithm and when it is stable.
- Implement a stack and a queue on a linked list and on a circular array.
- Trace insert and extract-max on a binary heap.
- Explain separate chaining versus open addressing and their load-factor behaviour.
Before the final heaviest topics
- Insert into and delete from a BST; describe why an AVL tree stays balanced.
- Represent a graph three ways and choose the right one for a problem.
- Run BFS and DFS by hand and apply them to components, cycles and topological order.
- Run Dijkstra's algorithm and know when Bellman-Ford is needed instead.
The mistakes that cost marks
Reading the slides after class. The flipped format means lecture time is spent on problems; arriving without the reading turns the session into catch-up.
Using a Python list as a queue. Pop from the front is O(n); use collections.deque, which the course explicitly contrasts.
Dijkstra's on negative weights. The modified Dijkstra's taught in class does not handle negative edges; the exam tests recognising when Bellman-Ford applies.
Teaching team
Who teaches IT5003
The bios below are factual. We do not rate lecturers; any star ratings are submitted by students who have taken IT5003.
Tan Yu Wei (Jeanette)
Teaching team as listed in the course materials reviewed. AskSia does not rate lecturers; star ratings are submitted by students who have taken IT5003.
Formula & concept sheet
The vocabulary and formulas you must own
- Abstract data type
- A specification of operations independent of implementation, such as List, Stack, Queue or Table.
- Binary heap
- A complete binary tree with the heap property, giving O(log N) priority-queue operations.
- Hash table
- A table ADT implementation mapping keys to slots via a hash function, with collision resolution.
- Load factor
- The ratio of stored keys to table size that governs hash-table performance.
- Binary search tree
- A tree where each node's key exceeds its left subtree and is below its right subtree.
- AVL tree
- A self-balancing BST whose subtree heights differ by at most one.
- Adjacency list
- A graph representation storing each vertex's neighbours, efficient for sparse graphs.
- Breadth-first search
- Layer-by-layer graph traversal that finds shortest paths in unweighted graphs.
- Dijkstra's algorithm
- A greedy shortest-path algorithm for graphs with non-negative edge weights.
- NP-completeness
- The class of problems for which no polynomial-time algorithm is known, and which are all equally hard.
Set texts
The prescribed reading
The syllabus references map straight onto these.
Competitive Programming 4, Book 1
.
Where it fits
Prerequisites, related courses & why it matters
Prerequisite: IT5001 or CS1010 (or variants). 4 units; 12 teaching weeks; offered in Semester 1 and Semester 2. Taken mainly by Master of Computing (General Track) students; optional for Digital Financial Technology students from AY2026/27.
Your IT5003 study toolkit
Study the course with Sia, not just read about it
Each tool already knows IT5003: your syllabus, your texts, and where the marks are. Grouped by how you study, from first contact to exam week.
FAQ
Frequently asked questions
Is IT5003 hard?
Moderate on the six-factor rubric. The pace is the challenge — twelve weeks of two-hour lectures covering most of the undergraduate CS2040S — but tests are open book and the problem sets are scored generously.
What is the assessment breakdown?
Kattis problem sets 13%, VisuAlgo online quizzes 12%, tutorial and lab participation 5%, midterm test 20% and final assessment 50%, as published on the course website for S1 AY2026/27.
What changed in AY2026/27?
The lecturer aligned the weightage with CS2040S: midterm up from 16% to 20%, online quizzes down from 16% to 12%; lab hours became mock coding interviews; AVL trees were added; and the optional daily LeetCode list grew to 90 tasks.
Who teaches it?
Steven Halim, who also runs the Monday lab group; Tan Yu Wei (Jeanette) is the teaching assistant for the Saturday group.
Is there a practical exam?
No. The course page states there is not enough contact time for one.
Which language is used?
Python 3, with basic object-oriented concepts in the data structure implementations.
Study IT5003 with Sia
Work through course admin, analysis of algorithms, o(n log n) sorting 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