LAUNCH SALE 50% off every pass

See plans →

Talk through your solution in a coding interview

The interviewer grades whether your code works and whether they could follow how you got there. Practicing only the first is how strong solvers still get rejected.

Public sample

Clarify what the answer must contain

Before proposing an algorithm, say what the input contains and what your function should return. Ask about details that would change the method. For a pair-sum task, returning indices requires you to retain positions; returning values does not. Whether you may reuse an element also changes which pairs are valid.

Use a small example to confirm the contract. For the values [4, 4, 7] and a target of 8, ask whether the two separate copies of 4 form a valid answer. Then state the assumption you will use and continue. A useful question removes an ambiguity from the code you are about to write.

Read the full preparation guide.

  • Clarify an ambiguous problem with a small example.
  • Explain an invariant and estimate the work before coding.
  • Test out loud and recover when a counterexample breaks the first idea.

Checkout closed

Read a free guide
Esc
↑↓Move ↵Open Ctrl↵New tab >Actions ?Shortcuts

Keyboard shortcuts

Anywhere

Open search
CtrlKor /
Show these shortcuts
?
Close a window or menu
Esc

In search

Move through results
↑or ↓
Open the result
↵
Open in a new tab, or a problem on its judge
Ctrl↵
List actions only
>
Remove the filter
⌫

Go to

Learn
GthenL
Practice
GthenP
Assessments
GthenA
System design
GthenS
Companies
GthenC
My profile
GthenM
Today's quest
GthenT
Home
GthenH

Report a bug

Page