CS2040S is your standard intro to dsalgs module. It covers the typical dsalgs that a programmer would need to pass leetcode interviews in their career. I found the problems presented in this module tougher than I expected, and it helped me revise on the data structures I already knew.
Module Components
This module is run on Coursemology, even the tutorial registrations are done here instead of on CourseReg. I missed the initial round of tutorial registrations cause of this as I was not aware no announcements would be made on Canvas. The module has 3 components, Coursemology level, midterm, and finals, however the individual weightage of each component is not known. To get the max grade for the Coursemology component, you just have to hit level 35, which is very doable if you just do every lecture review and problem set.
Linear data structures
The first few weeks of the module is really trivial. It just covers common data structures like stacks and queues and simple algos like binary search and peak finding. Even if you have no experience with data structures, this part of the module should be trivial.
Non-linear data structures
Halfway into the semester is where data structures like trees, graphs and hashmaps get introduced. This is where more people struggle as they deal with unfamiliar data structures and unintuitive algos. I found the graph problems presented much harder than I expected, and I learnt new ways to solve such problems. The module also briefly covered UFDS, but was not used in the problem sets or finals, which I was disappointed by as I wanted to see more practical applications of this interesting data structure.
Conclusion
To be honest, I greatly underestimated the difficulty of the midterm and finals. I thought it would be a breeze as I had a lot of experience using these data structures and doing leetcode questions. However one factor I did not anticipate would cause such an issue for me was the lack of a feedback loop. When solving problems on leetcode, you constantly get back error messages or failed test cases, and you can easily deduce what went wrong and fix your code. This is obviously not there in a written exam, and I also realise that I have a habit of being too overconfident of my initial solutions, leading to simple mistakes not being caught and getting penalised harshly for the exams. If you are someone like me, I would recommend taking it in Sem 1 where there is a practical component as well.
Nonetheless, I would still say I enjoyed this module, especially working on the problem sets, since they were well made and fun to solve. My biggest net benefit from this module would probably be learning how to solve DP problems properly, as I'm now able to formulate recurrences and code solutions to DP problems much easier on leetcode problems than before.
Grade breakdown
Assessment | Marks | LQ | Med | UQ |
---|---|---|---|---|
Coursemology | 35/35 | |||
Midterms | 42/60 | 37/60 | 43/60 | 49/60 |
Finals | 41/70 | 29/70 | 34.5/70 | 41/70 |
Expected grade: A-
Final grade: A-