Interview

Interview preparation

Questions of the five kinds interviews actually use: explain a concept, predict what a program prints, find the bug, write the code, and reason through a scenario. Every answer explains why, and every program’s output was produced by running it.

How to use these

  1. Read the question, answer it out loud before opening the answer, then compare. The gap is what to study.
  2. For output-prediction questions, commit to an answer first; then press Run and see why you were right or wrong.
  3. For coding questions, write your own version in the language’s practice section before reading the reference.
  4. Scenario questions have no single answer; the point is the trade-offs you can name.