A blog series
Computer Science Foundations Interviewers Assume
The computer science underneath your code: how programs run, memory and CPU caches, floating point, Unicode, binary and bit tricks, probability, hard problems and string searching, explained in plain English with runnable examples.
- Started
- 2026
- Lessons
- 8
- Reading
- ~2 h
Contents
Every lesson has the same steps: what it is, how it works, a real example, common mistakes, then interview questions with answers you can say out loud.
- Lesson 00How a Computer Runs Your ProgramFrom source code to machine code: compiling, interpreting and JIT, the stack and the heap, function calls, stack overflow and garbage collection.20 min
- Lesson 01Memory, CPU Caches and Why Array Order MattersThe memory hierarchy, cache lines, locality, and a timing experiment that walks a matrix row by row and column by column.15 min
- Lesson 02Floating Point: Why 0.1 + 0.2 Is Not 0.3IEEE 754 doubles with bit-level demos, rounding, safe integers, comparing floats and handling money.16 min
- Lesson 03Unicode, UTF-8 and Strings That LieCode points, UTF-16 code units, bytes and grapheme clusters, why emoji lengths surprise you, normalisation and safe truncation.20 min
- Lesson 04Binary, Endianness and Bit TricksReading binary and hex, two's complement, JavaScript's 32-bit bitwise operators, masks, endianness and DataView.17 min
- Lesson 05Combinatorics and Probability for InterviewsCounting rules, permutations and combinations, the birthday paradox, expected value, Bayes in plain words, Fisher-Yates and reservoir sampling.17 min
- Lesson 06P, NP and Hard Problems: What to Say in an InterviewComplexity classes in plain words, NP-complete examples, and what to do when a problem is hard: exact for small inputs, approximation and heuristics.15 min
- Lesson 07String Searching: Naive, KMP, Rabin-Karp and ZThe naive worst case, KMP with a traced failure function, Rabin-Karp collisions, the Z-array and a tiny Aho-Corasick, with local timings.14 min
Glossary
17 terms used in this series. Inside any lesson, hover or tap a dotted term to see its meaning without leaving the page. Browse all terms →