Skip to content

Foundations

Almost every coding interview is testing the same handful of ideas: can you model a problem with the right data structure, can you bound the cost of your solution, and can you explain the trade-off out loud. This track covers exactly that. It is language-agnostic; the code is Ruby where a concrete example helps, because that is the language most of this wiki is written in.

You do not need a CS degree. You do need to be able to say “this is O(n log n) because the sort dominates and the scan is linear” without hesitating.

  1. Read in order the first time. Each page assumes the previous one.
  2. Implement, do not highlight. Every structure and algorithm here is 20–40 lines. Write it from scratch once, delete it, write it again from memory.
  3. Say the answer out loud. The ## The 60-second answer section exists so you can rehearse the version you give under pressure.
  4. Attack the follow-ups. The Follow-up questions sections are what separates a pass from a strong hire.
Page What it gives you
Big O Notation How to state and defend the cost of an algorithm
Data Structures The menu of structures, their costs and when to reach for each
Algorithms The patterns: sorting, searching, traversal, DP, greedy, backtracking
Problem Solving Framework The repeatable script for a 45-minute interview
P vs NP Why some problems are hard, and what to do when yours is one
Concurrency Threads, locks, deadlocks, async I/O and the mental model behind them
Programming Paradigms Imperative vs declarative, OOP, functional, SOLID
Design Patterns The patterns worth knowing, and when they are over-engineering
  • Pick one pattern (say, sliding window). Read it, then solve three problems that use it.
  • Write the solution from scratch the next day, no notes. If you cannot, you did not learn it.
  • Explain it to a rubber duck in under two minutes, including complexity.
  • Log the failure mode. “I forgot the right - left + 1 size calculation” is more useful than “I studied sliding window”.

Foundations feed every other track. Once this is solid, move to Ruby or back to Start here to pick a study plan.