The main course book is our adaptation of the OpenDSA interactive course book.
For doing the labs you will want to look up the Java collections library documentation, or the Python documentation.
There are several tools available for visualising how different data structures and algorithms work. Our favourites are of course developed by ourselves:)
Here are some other favourites:
Data structures is a subject that is taught in a similar way all over the world. This means that there are loads of books about data structures and algorithms. Most of them are ok and present roughly the same material as we do in this course. If you get your hands on a second-hand course book, it’s probably good enough. But be prepared that there might be differences both in how they are organised and what content is included.
We recommend Algorithms (2014) by Robert Sedgewick and Kevin Wayne as supplemental reading, because they have better explanations of the data structures and algorithms. And lots of examples and exercises. It’s enough to only read part 1, which is a very affordable e-book.
The book has an excellent website which is well worth a look. You can find short explanations of each data structure from the book (under the chapter headings on the left of the page), as well a cheatsheet, and references to classic papers.
Here are some course-related books that are available free online. You do not need to read them to pass the course, but if you want to go deeper then the first book in particular is great!
The Algorithm Design Manual, by Steven S Skiena. The e-book is free at the Chalmers library for students with a Chalmers CID. A very readable book that teaches you how to design fast algorithms using appropriate data structures, and how to think about algorithm design. A cool part is the “War Stories” where the author describes real-world problems they had to solve and the thought process that led them to an algorithmic solution.
Open Data Structures by Pat Morin. A free textbook that covers lots of the course material. We found it harder to understand than Sedgewick and Wayne, but it is useful as a reference. It has separate editions for Java, Python and C++.
Advanced: Algorithms by Jeff Erickson. A free algorithms textbook. Very well-written, but doesn’t match up well with the course contents (it’s made for a more advanced course). Still, well worth a look if you want to learn more about algorithm design.
The books in this section are not part of the course, but are great reads if you want to learn more. All of them can be found in the Chalmers library.
Programming Pearls by Jon Bentley. This is a real classic book of computer science, and very relevant to the course. It’s a collection of short articles, each of which presents a creative and elegant solution to some programming problem. The solution often involves clever use of some data structure. The book is also: a) well written, b) quite short and c) quite cheap. If you read it you will become a better programmer! It is available online for Chalmers students.
Advanced: We don’t explicitly cover data structures in functional languages (though any structure based on trees usually translates well). If you want to learn about advanced functional data structures, the classic reference is Chris Okasaki’s book, Purely Functional Data Structures.
Advanced: We only scratch the surface of the mathematics of algorithm analysis (e.g. solving recurrence relations). It’s really a whole subfield of discrete mathematics with many cool techniques. If you want to learn much, much, much more about it, a good book is Concrete Mathematics by Ronald Graham, Donald Knuth and Oren Patashnik. It’s hard work but rewarding!