What I Changed After a Decade of Teaching Algorithms
I’ve taught Data Structures & Algorithms nine times now. The syllabus topics have barely changed — trees are still trees — but almost everything about how I teach the course has.
The mistake I made for years
Early on, I graded almost entirely on final code correctness. A student who spent four hours debugging a segfault and a student who wrote a working solution in twenty minutes got the same score if both submissions passed the test suite. This felt fair. It wasn’t useful.
What I couldn’t see from final submissions was where students’ mental models were breaking. Two students who both eventually got a working binary search tree could have arrived there through completely different levels of understanding — one through genuine comprehension, one through trial-and-error pattern matching against Stack Overflow.
What changed
Low-stakes, high-frequency checks
I moved from three high-stakes exams to weekly, ungraded-for-correctness “prediction checks”: before running code, predict what it does; before starting a proof, predict where it will get hard. This surfaces broken mental models while they’re still cheap to fix.
Live debugging in class
Once a week, I debug a piece of broken code live, out loud, including the wrong turns. Students consistently report this is the single most useful recurring activity in the course — not because the bugs are exotic, but because watching an expert be temporarily wrong normalizes struggle as part of the process, not a sign you don’t belong in CS.
Rubrics that reward process, not just output
Every project now includes a short written reflection: what approach did you try first, why did it fail, what did you change? Grading this alongside correctness has done more to reduce academic dishonesty than any proctoring tool, because it makes the thinking the thing being assessed.
The result
Final exam scores haven’t moved dramatically. What has moved is retention in the CS major among students who entered without prior programming experience — up meaningfully since these changes, though I want another few years of data before I’d call that causal. What I’m confident about is smaller: fewer students leave office hours saying “I guess I’m just not a CS person.” That alone was worth the redesign.
On this page
Abhiraj Bibhar
Department of Sociology and Anthropology
SRM University - Andhra Pradesh