Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Concepts, Python Examples, and Algorithmic Reasoning

Developed from the CS2040HS teaching materials at the National University of Singapore, this guide explains how representations, operation rules and algorithmic strategies fit together. Read by topic to build understanding, or use search and the concept index to revisit a specific idea.

Current coverage: All sixteen topics have developed, aligned self-reading material, including a complete transport-network application. Topics 14–15 add optional DSA concepts beyond the lecture inventory. See the coverage review for additions, limitations and priorities.

Code panels offer Python, JavaScript and Julia. See the language guide and topic downloads; explanations and diagrams use Python as their reference.

Choose a reading route

Start with Foundations, Algorithm analysis and Recursion. These establish the language, cost models and proof habits used throughout the book.

Then choose the question you want to answer:

The reading guide gives prerequisites and shorter routes. The sidebar follows a suggested learning sequence; you can also use these shorter routes or search for individual concepts.

Questions to carry through the book

What must the operation return? Which representation supports it? What remains true after each step? Why does it terminate? How does the work grow, and under which assumptions?

Figures and Python examples make these questions concrete. The examples are ordinary code listings: no notebook or course-repository access is required to read the book.