Course Outline
The official course outline is available here. Below is similar information, though you should consult the official course outline first. Assessment structure is provided below, absent from the official course outline.
Contents
- Course Details
- Course Summary
- Course Aims
- Student Learning Outcomes
- Assumed Knowledge
- Teaching Rationale
- Teaching Strategies
- Assessment
- Course Schedule
- Resources for Students
- Student Conduct
- Course Evaluation and Development
Course Details
| Course Code | COMP2521 |
|---|---|
| Course Title | Data Structures and Algorithms |
| Course Convenor | Prof. Michael Thielscher |
| Lecturer | Ethan Brown |
| Course Contact Email | cs2521@cse.unsw.edu.au All admin-related queries must be sent to this email address. |
| Course Website | https://cgi.cse.unsw.edu.au/~cs2521/26T0/ |
| Handbook Entry | https://www.handbook.unsw.edu.au/undergraduate/courses/2026/COMP2521/ |
Course Summary
The aim of this course is to get you to think like a computer scientist. This certainly sounds like a noble goal... but what does it really mean? How does a scientist, let alone a computer scientist, actually think?
What many types of scientists try to do is understand natural systems and processes: a geologist, for example, tries to understand the structure of the earth; a biologist tries to understand living organisms; a chemist tries to understand materials and reactions, and so on.
Computer scientists don't, as the name might suggest, simply try to understand the structure and behaviour of computers, but are more concerned with understanding software systems (and the interaction between the software and the hardware on which it runs). Also, unlike other scientists, computer scientists frequently build the objects that they study.
The goal of this course is to deepen your understanding of data structures and algorithms and how these can be employed effectively in the design of software systems. It is an important course in covering a range of core data structures and algorithms that will be used in context in later courses. You explore these ideas in lectures, tutorials, lab exercises, quizzes and assignments. Assessment involves lab exercises, quizzes, assignments and a final exam involving both practice and theory. At the end of the course, we want you to be a solid programmer, with knowledge of a range of useful data structures and programming techniques, and ready to continue with further specialised studies in computing.
Topics
This course provides an introduction to the structure, analysis and usage of a range of fundamental data types and the core algorithms that operate on them. Key topics are:
- Recursion
- Analysis of algorithms
- Abstract data types
- Binary search trees
- Balanced search trees
- Graphs
- Sorting algorithms
- Heaps
- Hashing
- Tries
Executive Summary
A summary of the critical things to know about COMP2521:
- Attempt all of the lab exercises, quizzes, and the assignment yourself
- Always try to produce a better program than last time
- In lectures, think critically about what's being said/shown
- The textbook is a useful reference source beyond this course
- Assessment structure:
- Labs: 15%
- Quizzes: 10%
- Assignment: 25%
- Final Exam: 50%
- There is a hurdle in the final exam, consisting of:
- Achieve at least 40% overall in the final exam
- Achieve at least 25% in the theory section of the final exam
- Achieve at least 25% in the programming section of the final exam
- enjoy the course!
Assumed Knowledge
The official pre-requisite for this course is completion of COMP1511 or DPST1091 or COMP1917 or COMP1921.
Whether or not you satisfy the pre-requisite, we assume that:
- You can program in the C programming language, and are familiar with arrays, strings, pointers, and dynamic memory allocation
- You are able to design, implement, debug, test and document small programs (up to several hundred lines of code) in C or a C-like language
- You are familiar with the Linux environment on the CSE computers
Installing Linux, possibly as a virtual machine, on your own computer would be a major bonus.
Course Aims
During this course, we'll be looking at ways of creating, analysing and understanding software. Ultimately, you should be able to answer the question, is this piece of software any good?
and be able to provide sound reasons to justify your answer.
This course follows on from introductory C programming courses: COMP1511, COMP1917, or COMP1921. We cover additional aspects of the C programming language that were not covered in those courses, and also look at some programming tools which were not covered (in detail) earlier. However, this course is not simply a second C programming course: the focus is on the ideas and abstractions behind the data structures and algorithms that are used.
COMP2521 is a critical course in the study of computing at UNSW, since it deals with many concepts that are central to future studies in the area. Whether you are studying Computer Science, Software Engineering, Bioinformatics, Computer Engineering, or even a discipline outside the realm of computing, understanding a range of algorithms and data structures and how to use them will make you a much more effective computing problem solver in the future.
Student Learning Outcomes
After completing this course, students will:
- Be familiar with fundamental data structures and algorithms
- Be able to analyse the performance characteristics of algorithms
- Be able to measure the performance behaviour of programs
- Be able to choose/develop an appropriate data structure for a given problem
- Be able to choose/develop appropriate algorithms to manipulate chosen data structures
- Be able to reason about the effectiveness of data structures and algorithms for solving a given problem
- Be able to package a set of data structures and algorithms as an abstract data type
- Be able to develop and maintain software systems in C that contain thousands of lines of code
This course contributes to the development of the following graduate capabilities:
| Graduate Capability | Acquired in |
|---|---|
| scholarship: understanding of their discipline in its interdisciplinary context | lectures, assignment |
| scholarship: capable of independent and collaborative enquiry | lab work, assignment |
| scholarship: rigorous in their analysis, critique, and reflection | tutorials |
| scholarship: able to apply their knowledge and skills to solving problems | tutorials, lab work, assignment |
| scholarship: ethical practitioners | all course-work, by doing it yourself |
| scholarship: capable of effective communication | tutorials |
| scholarship: digitally literate | everywhere in CSE |
| leadership: enterprising, innovative and creative | assignment |
| leadership: collaborative team workers | lab work |
| professionalism: capable of operating within an agreed Code of Practice | lab work, assignment |
Teaching Rationale
Computer science is, to a large extent, a practical discipline, and so COMP2521 has an emphasis on practice. Lectures will include exercises where we examine the practice of developing and analysing programs. The aim of tutorials is to develop analysis and understanding via practical case studies. Lab classes also provide practice in program development and analysis. Assignments provide large case studies of software development.
Teaching Strategies
COMP2521 involves lectures, tutorials, labs, quizzes and an assignment.
Lectures
Each week, there will be eight hours of lectures during which theory and practical demonstrations will be presented. Lectures convey a small amount of information about the course content, but their main aim is to try to stimulate you to think about concepts and techniques.
All lectures will be recorded and made available on YouTube. We will also endeavour to livestream lectures to YouTube.
Tutorial/Lab Classes
Every week starting from Week 1, you are expected to attend a three-hour tutorial/lab class to clarify ideas from lectures and work through lab exercises. Classes begin with a one-hour tutorial, followed by a two-hour lab.
All classes will be face-to-face.
Tutorials
Tutorials aim to clarify ideas from lectures and to encourage you to think about design and analysis issues. The aim of the class is not simply to get the tutor to give you the answers; rather, it is to focus on one or two of the exercises and work through them in detail, discussing different aspects, alternative approaches, and fine details. You are expected to participate actively and ask questions during tutorials.
You should make sure that you use this time effectively by examining in advance the material to be covered in each week's tutorial. This means that you are coming to class prepared to ask any questions that you may have, and generally participate in class by offering suggestions - this will ensure that you get the most possible out of the tutorial. Your tutors are there to help you clear up any misunderstandings or to understand topics in more depth. The tutorial questions will be linked to the class webpage before the tutorial. There are no marks for tutorial attendance; however, it is your opportunity to have your questions answered.
Labs
Labs aim to give you practice in problem solving and program development. Each week, there will be a few exercises to work on. These exercises will be released in the week preceding the lab class. Labs are to be completed individually.
Lab Submission and Marking
Each lab exercise must be submitted using the give command or via give's web interface by 12pm Monday (Sydney time) in the week following the lab. Multiple submissions are allowed - only the last submission will be marked. Late submissions will be penalised in accordance with UNSW's standard late penalty.
Each lab exercise will be marked out of 5. Marks for each lab consist of an automarking component, which is based on the correctness of the code, and a handmarking component, which is based on other aspects such as style and complexity analysis. The weightings of these components vary depending on the lab. Specific details can be found in the specification for each lab.
Labs that have an automarking component will be automarked after submissions are closed. Marks for the handmarking component can be obtained by showing your work to your tutor during your lab session, within one week of the lab. You must show the work that you submitted, not a modified version of your work or someone else's work. Your tutor will provide feedback on your approach to the problem and on the style of your solution.
Quizzes
At the beginning of each week, a quiz will be released on WebCMS which tests your understanding of the lecture content from that week and the week prior. Quizzes are to be completed individually.
Quizzes must be submitted by the specified due date. Multiple submissions are allowed - only the last submission will be marked. Late submissions will be penalised in accordance with UNSW's standard late penalty.
Assignment
There is one assessable programming assignment.
In the assignment, you will work on more substantial (hundreds of lines of code) programming exercises. The assignment will give you the chance to practice that you have learned on relatively large problems. The assignment is a very important part of this course, therefore it is essential that you attempt it yourself. Collaboration with other students is limited to discussion of fundamentals, not any discussion of assignment specifics. The assignment will be thoroughly checked for plagiarism, which can result in serious academic consequences.
Late submissions will be penalised in accordance with UNSW's standard late penalty.
Final Exam
There will be a three-hour final exam, held in the CSE labs during the exam period.
The final exam is a summative assessment that will test your understanding of concepts covered in the course and your programming ability. The exam will contain theory questions and programming questions. A sample exam will be provided in week 4 to demonstrate the format of the exam.
There is a hurdle for the final exam. Failure to meet the hurdle will result in failing the course, regardless of your performance in the other assessments of the course. To pass the hurdle, you must:
- Achieve at least 40% overall in the final exam
- Achieve at least 25% in the theory section of the final exam
- Achieve at least 25% in the programming section of the final exam
Fit-to-Sit Policy
UNSW has a fit-to-sit policy, which means if you sit the final exam, you are declaring yourself fit enough (both physically and mentally) to complete the exam to the best of your ability. Supplementary exams will only be granted to students that are granted Special Consideration.
Assessment
Your final mark in this course will be based on components from the assignment work, quizzes, labs, and the final exam.
| Item | Topics | Due | Marks | Contributes to |
| Labs | All topics | Weeks 2, 3, 4, 5 | 15% | 1, 3, 4, 5 |
| Quizzes | All topics | Weeks 1, 2, 3, 4, 5 | 10% | 1, 2, 3, 4, 5, 6, 7 |
| Assignment | Trees/Graphs | Week 5 | 25% | 4, 5, 7, 8 |
The following describes precisely how your final mark will be computed:
labs = mark for lab exercises (out of 15)
quizzes = mark for quizzes (out of 10)
assign = mark for assignment (out of 25)
theoryExam = theory component of exam (out of 20)
programmingExam = programming component of exam (out of 30)
finalExam = theoryExam + programmingExam
mark = labs + quizzes + assign + finalExam
hurdle = (finalExam >= 20)
&& (theoryExam >= 5)
&& (programmingExam >= 7.5)
grade = UF if hurdle == false
= HD|DN|CR|PS if mark >= 50
= FL if mark < 50
Late Penalties
COMP2521 implements UNSW's standard late submission penalty, described here. Late submissions for lab exercises, quizzes and assignments will be penalised by 0.2% per hour or part thereof (off the attained mark, not the maximum mark), capped at five days from the assessment deadline, after which submissions are no longer accepted.
For example, a submission worth 91% that is submitted 10 hours late will receive a penalty of 2%, resulting in a mark of 89%. A submission worth 91% that is submitted 25 hours late will receive a penalty of 5%, resulting in a mark of 86%.
Technical Issues and Extensions
Extensions will only be given if there is scheduled server maintenance or servers unexpectedly go down close to the deadline. Please make sure to start your lab exercises and assignments early and work on them consistently.
Special Consideration
If your work in this course is affected by unforseen adverse circumstances, you should apply for Special Consideration through myUNSW, including documentation on how you have been affected. If your request is reasonable and your work has clearly been impacted, then:
- For a lab exercise/quiz/assignment, you may be granted an extension
- For the final exam, you may be offered a supplementary exam
Note that an extension is not immediately guaranteed upon applying for Special Consideration - whether you are granted an extension depends on whether you make a convincing case that the circumstances have clearly impacted your ability to work. The course staff are not involved in assessing Special Consideration applications.
If you are registered with Equitable Learning Services, please forward your Equitable Learning Plan to the course email address within the first two weeks of the term. Please familiarise yourself with the conditions stated on your ELP. For example, most extensions affored by an ELP require an explicit request, and are not implemented automatically.
Course Schedule
Please note that this course schedule is just a plan and is subject to change.
| Week | Lectures | Tutorials | Labs | Assignments |
|---|---|---|---|---|
| 1 | Course Introduction, Recursion, Analysis of Algorithms, Sorting Algorithms | Welcome, Recursion | Recursion | - |
| 2 | Abstract Data Types, Binary Search Trees | Analysis of Algorithms, ADTs, Binary Search Trees | Binary Search Trees | Assignment released |
| 3 | Graph Basics, Directed and Weighted Graphs, Graph Algorithms | Graphs | Graph Basics | - |
| 4 | Graph Algorithms (continued), Hash Tables | Weighted Graphs | MSTs | - |
| 5 | Priority Queues, Heaps, Tries, Course Review | Hashing, Heaps, and Tries | Assignment due Monday 8pm |
Resources for Students
COMP2521 follows the contents of the pair of books:
-
Algorithms in C, Parts 1-4: Fundamentals, Data Structures, Sorting, Searching (3rd Edition)
by Robert Sedgewick, published by Addison-Wesley -
Algorithms in C, Part 5: Graph Algorithms (3rd Edition)
by Robert Sedgewick, published by Addison Wesley
These two books are available as a bundle from the UNSW bookshop. They are expensive, but are useful well beyond this course, and will serve as a useful reference on the bookshelf of any serious programmer.
You may also be able to find on-line resources related to the textbooks. Robert Sedgewick has a series of videos on the topics in this course, but unfortunately they all seem to be in Java (which he has used for the new edition of his book). If you find any useful on-line resources, please let me know and we will add them to the Resources section of the course web site (with credit to the finder).
This website also has links to the auxiliary material/documentation that you will need for the course. Solutions for all tutorial questions and lab exercises will also be made available.
Student Conduct
The Student Code of Conduct (Information, Policy) sets out what the University expects from students as members of the UNSW community. As well as the learning, teaching and research environment, the University aims to provide an environment that enables students to achieve their full potential and to provide an experience consistent with the University's values and guiding principles. A condition of enrolment is that students inform themselves of the University's rules and policies affecting them, and conduct themselves accordingly.
In particular, students have the responsibility to observe standards of equity and respect in dealing with every member of the University community. This applies to all activities on UNSW premises and all external activities related to study and research. This includes behaviour in person, as well as behaviour on social media, for example Facebook groups set up for the purpose of discussing UNSW courses or course work. Behaviour that is considered in breach of the Student Code of Conduct as discriminatory, sexually inappropriate, bullying, harassing, invading another's privacy, or causing any person to fear for their personal safety is serious misconduct and can lead to severe penalties, including suspension or exclusion from UNSW.
If you have any concerns, you may raise them with your lecturer, or approach the School Ethics Officer, the School Grievance Officer, or one of the student representatives.
Plagiarism
Plagiarism is defined as using the words or ideas of others and presenting them as your own. UNSW and CSE treat plagiarism as academic misconduct, which means that it carries penalties as severe as being excluded from further study at UNSW. There are several on-line sources to help you understand what plagiarism is and how it is dealt with at UNSW:
Make sure that you read and understand these. Ignorance is not accepted as an excuse for plagiarism. In particular, you are also responsible that your assignment files are not accessible by anyone but you by setting the correct permissions in your CSE directory and code repository, if using. Note also that plagiarism includes paying or asking another person to do a piece of work for you, and then submitting it as your own work.
UNSW has an ongoing commitment to fostering a culture of learning informed by academic integrity. All UNSW staff and students have a responsibility to adhere to this principle of academic integrity. Plagiarism undermines academic integrity and is not tolerated at UNSW. Plagiarism at UNSW is defined as using the words or ideas of others and passing them off as your own.
If you haven't done so yet, please take the time to read the full text of UNSW's policy regarding academic honesty and plagiarism.
The pages below describe the policies and procedures in more detail:
Referencing Code
In labs and assignments, any code you use that was copied or derived from anyone other than yourself must be clearly referenced. A simple guide for referencing code can be found here.
Course Evaluation and Development
Student feedback on this course, and on the effectiveness of lectures, tutorials and labs in this course, is obtained via electronic survey (myExperience) at the end of each semester. Student feedback is taken seriously, and continual improvements are mad e to the course based in part on this feedback. Students are strongly encouraged to let the lecturer in charge know of any problems as soon as they arise. Suggestions and criticisms will be listened to openly, and every action will be taken to correct any issue or improve the students' learning experience.