Software Development - Clean Code, Data Structures, and Algorithms
Readings and Resources:
Required Reading:
Lecture:
Exercise:
Tutorial:
Additional Resources
Competitive Programming Deliverables
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
Class Design - Flipped Classroom
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 with Algorithms and Data Structures. |
-
| 90 min |
Applying theoretical input in a hands-on class project: Building a text editor (https://github.com/dominikb1888/rim). |
Exam (graded)
The Exam will be written and online. It will be a code exercise just like the ones you practice with tests provided.
Agenda
- 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
Deliverables
Sessions
1. Algorithms: Analysis, Design, and Evaluation
Lecture:
- Introduction to Data Structures: Simple Linked List
- Introduction to Estimating Algorithm Runtime
In-class Exercise:
Required Reading:
- https://en.algorithmica.org/hpc/complexity/
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/
2. Recursion
Exercise:
- Extending rim with a Linked List (Undo function)
3. Sequences
Interactive:
- Building a Linked List from Scratch (https://rust-unofficial.github.io/too-many-lists/)
- Rust Memory Allocation and Pointers
Data Structures:
- Linked Lists: Improving on our Exercise
- Doubly Linked Lists
- Skip Lists
- Dynamic Arrays (Vec):
Algorithms for Sorting and Ordering:
- Bubble Sort
- Merge Sort (Divide and Conquer)
- Quicksort
4. Maps and Sets
Algorithms:
Data Structures:
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
5. Trees
Data Structure:
- Heap
- Binary Search Tree
- Red-Black Tree
- Trie
- B-Tree
Algorithms
6. Graphs
- Graph Representation: Adjacency Matrix
7. Membership Structures
8. Heaps
9. Balanced Binary Search Trees
10. B-Trees
11. Heuristic Search
12. Practice and Mock Exam
13. Practice and Mock Exam
Further Reading