Course syllabus


  • DAT038/TDA417 Datastrukturer och algoritmer, lp2 HT22 (7.5 hp)
  • DAT525 Datastrukturer och algoritmer, lp2 HT22 (6.0 hp)

Note that this is a joint site for the three courses DAT038, TDA417, and DAT525. The first two are exactly the same in structure, lectures, assignments, and examination. The smaller course (DAT525) has fewer labs. 

Teachers and student representatives

For detailed contact information, and nice mugshots, see the contact page.

  • Teachers: Peter Ljunglöf (examiner), Nick Smallbone
  • Teaching assistants: Sólrún Einarsdóttir, David Lidell, Carlos Tomé Cortiñas, Adam Magnusson, Alex Berglund, David Lidevi, Eli Adelhult, Emil Wingårdh, Gabriel Shafiq Ahlgren, Gustav Kalander, Gustav le Dous, Hugo Ganelius, Johan Andersson, Jonathan Widén, Ole Fjeldså, Osama Al Sheikh Ali, Sackarias Lunman, Valdemar Stenhammar, Victor Song
  • Student representatives:
    • DAT038: ?
    • TDA417: ?
    • DAT525: ?

Course purpose

Data structures and algorithms are fundamental building blocks in almost all software products. Knowledge of data abstraction, data structures, and algorithms is important in the construction, use, and maintenance of adaptable, reusable, and efficient program components.

The course gives knowledge and skills in the construction and use of data structures and algorithmic concepts, and gives an introduction to algorithm analysis and data abstraction.



Course literature

The main course book is a modified version of the online book, Open Data Structures and Algorithms. Some additional material will be made available during the course. 

A very good additional book is Robert Sedgewick and Kevin Wayne (2011). Algorithms, 4th edition. You can find this book as a quite inexpensive online book.

Other interesting books and useful websites are listed under Reading material.

Course organisation and examination

The detailed schedule is in TimeEdit, and details about the lectures and assignments are in the Modules, but here is some general information.


  • There are usually 3 lectures per week: Mondays (13:15–15:00 and 15:15–17:00), Tuesdays (13:15–15:00 and 15:15–17:00), and Thursdays (13:15–15:00 and 15:15–17:00).
  • Every lecture is given twice, students can choose which lecture to attend.
  • Lecture slides and associated material can be found in the Lectures page.


  • There are 2–3 compulsory laborations.
    • DAT038/TDA417 has 3 laborations.
    • DAT525 has 2 laborations.
  • Every laboration has two deadlines:
    • You must submit something for the first deadline, even if it's not working.
    • The teachers grade and comment on the first submission, and if it's not accepted, you have until the second deadline to correct your solution.
  • The laborations are done in groups of 3 students.
    • Every student should fine someone to team up with, and there are Slack channels to help you find lab partners.
    • It is fine to team up with a student in another program (but make sure you study a course with the same number of labs).
    • The labs can be done in Java or Python, and it's up to the lab group to decide.
  • There are lab supervision sessions Mondays (9–12), Wednesdays (13–19), Thursdays (9–12) and Fridays (13–16), where you can get help from course assistants.
  • Lab supervision will be done both on campus, and online via Zoom.
  • The laborations are not graded, but you have to pass all three of them (two for DAT525).

Weekly exercises

  • Every week we will publish new quizzes and exercises which will help you in your learning.
  • You are encouraged to attend weekly exercise sessions: Mondays, Tuesdays or Thursdays, 13–15 or 15–17. 
  • The exercise sessions will be on campus.

Written examination

  • There is a written exam at the end of the course; as usual it is compulsory and individual.
  • Your final course grade will be decided from your result on the written exam. 

Passing the course

  • To pass the course you need to pass all 2 or 3 laborations, and the written examination.
  • The final grade is the same as the grade on the written examination.

Students from previous years (TDA416, DAT037)

  • If you passed all laborations, then you don't have to redo any labs – it's enough with passing the written examination. Note that the questions might differ slightly from the current students' exams.
    • if you passed the written examination but have some labs left to do, you have to submit all labs in this course!
    • i.e., you have to have the laborations subcourse marked as completed in Ladok
    • more information here

Changes made since the last occasion

The course has gone through the following changes since last year.

  • The old lab 1+2 is replaced by a (larger) new lab 1.
  • All labs are now available both in Java and Python.
  • Some exercises and quizzes are new.

Learning objectives and syllabus

You can read the complete syllabi on Studieportalen (DAT038TDA417, and DAT525 – note that the syllabi are almost equivalent), but here are the learning outcomes of the course:

Knowledge and understanding

  • explain some basic abstract data types and data structures, including lists, queues, hash tables, trees and graphs
  • explain some of the algorithms used to manipulate and query these data structures in an efficient way, and explain why they are correct

Competence and skills

  • apply basic abstract data types and data structures, and algorithms related to these
  • implement and use abstract data types as interfaces and data structures as classes, in an object-oriented programming language
  • use a standard library of data structures and algorithms

Judgement and approach

  • analyse the efficiency of different algorithms, for example searching and sorting algorithms
  • make informed choices between different data structures and algorithms for different applications

Course summary:

Date Details Due