Lecture:
- Book: Algorithms and Data Structures with Python
- Currently adapting to Rust (private repo, Ask for Access if necessary)
Exercise:
Rust Reference:
- https://rust-exercises.com/
- Rustlings
- Rust Book, Brown University with great quizzes:
- Rust by Example: https://doc.rust-lang.org/rust-by-example/index.html
- Algorithms and Data Structures in Rust (Second half)
In each exercise we will attempt a challenging algorithmic problem from the CSES Problemset: https://cses.fi/problemset/
Use this template for Rust Code: https://github.com/dominikb1888/cses_template
You can also use https://github.com/csesfi/cses-cli/ to download the exercises and test cases.
The course is taught in a Flipped Classroom style. You are required to prepare coding exercises and will be asked to present them in front of class on a random selection basis.
- 30 min | Review and joint development of selected Homework Exercises
- 60 min | Theoretical input on computational thinking and software engineering.
- 90 min | Applying theoretical input in a hands-on
The Exam will be written (online). It will be a code exercise just like the ones you practice with tests provided. The exam itself will count 60% of your grade. The 10 deliverables count 40%.
- Algorithms Analysis, Design and Evaluation (Chapter 2)
- Recursion
- Sequences
- Sets and Maps
- Trees
- Graphs
- Membership Structures
- Heaps
- Balanced Binary Search Trees
- B-Trees
- Heuristic Search
| Prepare before Session | Exercise | Topic |
|---|---|---|
| 2 | Tower of Hanoi | Recursion |
| 3 | Increasing Array | Dynamic Arrays |
| 4 | Two Sets | Sets |
| 5 | ||
| 6 | Subordinates | Trees |
| 7 | Counting Rooms | Graphs |
| 8 | Finding Borders | Membership Structures |
| 9 | Another Game | Heaps |
| 10 | Free Choice | Balanced Binary Search Trees |
| 11 | Free Choice | B-Trees |
| 12 | Free Choice | Heuristic Search |
In total you have to submit 10 Deliverables during the semester. The deliverables will count 40% of your final grade. You can submit these as part of your exam.
Lecture:
-
Introduction to Data Structures: Simple Linked List
-
Introduction to the class, exam, and deliverables
-
Introduction to Estimating Algorithm Runtime
-
Measuring and profiling Algorithm Runtime
In-class Exercise:
Required Reading:
Optional Reading
- https://nnethercote.github.io/perf-book/introduction.html
- https://towardsdatascience.com/benchmarking-rust-compiler-settings-with-criterion-62db50cd62fb
- https://patrickfreed.github.io/rust/2021/10/15/making-slow-rust-code-fast.html
- Last resort - Assembly Output: https://rust.godbolt.org/, https://darkcoding.net/software/underrust-rust-assembly-output/
Exercise Review:
- Recap of Tower of Hanoi Excercise Theory:
- Understanding Recursion and its memory footprint- The Stack, the Heap, Pointers and Recursion:
- Patterns: https://www.designgurus.io/blog/grokking-the-coding-interview-patterns
- Evaluating Algorithms (Recap of Session 1)
Exercise Review:
Theory:
- Rust Arrays and Vectors in Memory
- Options, Results, and Smart Pointers in Rust
Interactive:
- Building a better Linked List (https://rust-unofficial.github.io/too-many-lists/second.html)
Data Structures:
- Linked Lists: Improving on our Exercise
- Doubly Linked Lists
- Skip Lists
- Dynamic Arrays (Vec):
Exercise Review:
Interactive:
- Rust Memory Allocation, Cache Lines, Registers
Algorithms for Sorting and Ordering:
- Bubble Sort
- Merge Sort (Divide and Conquer)
- Quicksort
Reading:
- https://developerlife.com/2025/05/19/rust-mem-latency/
- https://www.danielokoronkwo.com/post/memory-caches-cpus-a-practical-mental-model/
- Detailed Registers and Cache Visualization tool: https://ripes.me/
Algorithms:
- Hashing
Data Structures:
- Maps
- Sets
Reading:
- https://medium.com/better-programming/implementing-a-hashmap-in-rust-35d055b5ac2b
- https://edgl.dev/blog/rust-hashmap/
- https://nnethercote.github.io/perf-book/hashing.html#:~:text=The%20default%20hashing%20algorithm%20is,short%20keys%20such%20as%20integers
- https://en.wikipedia.org/wiki/Collision_attack
- https://link.springer.com/chapter/10.1007/978-3-642-34931-7_28
- https://www.reddit.com/r/rust/comments/52grcl/comment/d7kcei2/
- https://betterprogramming.pub/implementing-a-hashmap-in-rust-35d055b5ac2b
- https://louisabraham.github.io/articles/exact-cover
- https://www.geeksforgeeks.org/solving-sudoku-using-bitwise-algorithm/
- https://medium.com/@dt_emmy/sudoku-solver-using-rust-8a4e83d921fd
Data Structure:
- Heap
- Binary Search Tree
- Red-Black Tree
- Trie
- B-Tree
Algorithms
- Heap Sort
- Graph Representation: Adjacency Matrix
- Bloom Filters