DevPrep

All topics › Behavioral & Soft Skills

What do you do when you don't know the answer?

Junior

What is being assessed

Honesty and thinking. The interviewer almost always notices when a candidate makes things up; confident bluffing ends an interview faster than "I don't know". What is valued is reasoning from the known to the unknown.

Answer skeleton

  1. Admit it directly: "I can't say for sure — I haven't used that API."
  2. Reason out loud: what I know about adjacent things, which principles apply, what answer would be logical and why.
  3. Say how you would verify: documentation, source code, a playground test, a measurement in Instruments.
  4. Clarify the question: sometimes "I don't know" means "I didn't understand the wording".
  5. Don't drag it out: 1–2 minutes of reasoning, then "we can come back to it if needed".

Example answer

Question: "What happens to a Task if the actor that created it is deinitialised?"

"Honestly, I haven't tested it. Reasoning: a Task is not tied to the actor's lifetime — it is not a child task, and it holds strong references to everything it captured. If the closure captured self strongly, the actor won't deinitialise until the task finishes. With [weak self] the task keeps running but self becomes nil. Cancellation won't happen by itself: you'd need to store the task and call cancel() in deinit. I'd verify in a playground with a print in deinit."

That answer shows a mental model even when you aren't sure of the details.

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store