The course is based on a set of: lectures, tutor sessions and assignments. The assignments should be sumitted in writing as well as presented oraly. The oral presentations are done during mandatory seminar sessions. Make sure that you sign up for a group and that you come well prepared to these seminars.
ID1021 Algorithms and Data Structures 7.5 credits

A basic course in computer science, that will give prerequisites for several advanced courses in computer science. The course will cover both theory on algorithms and data structures as well as practical software design.
Information per course offering
Choose semester and course offering to see current information and more about the course, such as course syllabus, study period, and application information.
Course syllabus as PDF
Please note: all information from the Course syllabus is available on this page in an accessible format.
Course syllabus ID1021 (Spring 2027–)Content and learning outcomes
Course disposition
Course contents
Basic algorithm analysis:
- Simpler analysis with respect to the resource needs of algorithms in the form of time and memory.
Fundamental algorithms:
- simple numerical algorithms
- sequential and binary search algorithms
- Depth first search and Width first search.
- sorting algorithms: selection sorting, insertion sorting, Quicksort, heapsort, mergesort.
Fundamental data structures:
- linear lists, stacks, queues, hash tables, binary tree, heaps, binary search trees and problem trees.
Program Design:
- design and implementation of programmes that use basic algorithms and data structures to solve computer science problems.
Intended learning outcomes
On completion of the course, students should be able to
- describe a number of common algorithms for search and sorting and their properties
- compare algorithms with regard to time and memory usage
- implement data structures as linear lists stacks, queues, hash tables, binary tree and search trees
- identify problems where the data structures above are useful and design simple algorithms with these
- write programmes that use algorithms and data structures by means of good programming principles such as systematic tests and abstraction
- model problems as search problems and implement algorithms for breadth-first-search, depth-first-search or best-first-search
in order to
- be able to design programmes that solve problems by using commonly occurring algorithms and data structures
- acquire sufficient prior knowledge to be able to take advanced courses in computer science.
Literature and preparations
Specific prerequisites
Knowledge and skills in programming, 7,5 credits, corresponding to completed course ID1022/ID1018.
Active participation in ID1022 during study period 2 of the same academic year is considered equivalent to completed course. Registered students are expected and considered to be actively participating.
Recommended prerequisites
The course structure is based on the participants having programming skills and being able to edit without help, compile and run simpler programs even in languages they may not normally use or have used before.
Literature
Examination and completion
Grading scale
Examination
- INL1 - Hand-in assignments, 7.5 credits, grading scale: A, B, C, D, E, FX, F
Based on recommendation from KTH’s coordinator for disabilities, the examiner will decide how to adapt an examination for students with documented disability.
The examiner may apply another examination format when re-examining individual students.
If the course is discontinued, students may request to be examined during the following two academic years.
Examiner
Ethical approach
- All members of a group are responsible for the group's work.
- In any assessment, every student shall honestly disclose any help received and sources used.
- In an oral assessment, every student shall be able to present and answer questions about the entire assignment and solution.
Further information
Course room in Canvas
Offered by
Main field of study
Education cycle
Transitional regulations
Students who have started the course with the previous examination ARBA and TENA can complete this and write an exam and make the missing assignments, these should be completed no later than Autumn 23.
Supplementary information
In this course, the EECS code of honor applies, see:
http://www.kth.se/en/eecs/utbildning/hederskodex