A focused 45-minute practice session
- Minutes 0–5: make the problem precise. Restate the input and output. Ask about empty input, duplicate values, ordering, and whether changing the input is allowed. Write down one example before you choose a data structure.
- Minutes 5–12: explain a baseline. Describe the simplest correct solution. Identify the operation that repeats and estimate its time and extra-space cost. A baseline makes the reason for an optimization easier to explain.
- Minutes 12–27: improve and implement. Choose a data structure because it removes a specific repeated operation. State an invariant: what remains true before and after each iteration? Keep the implementation aligned with that explanation.
- Minutes 27–37: test and follow up. Walk through a normal case, an empty or minimal case, and a case that could break your assumption. Change one constraint and explain what would need to change.
- Minutes 37–45: review the conversation. Note one unclear explanation, one missed edge case, and one useful follow-up. Re-explain the solution without reading the code.
Try this original practice problem
Given a list of integers and a target, return two distinct indices whose values sum to the target. If no pair exists, return an empty list.
values = [3, 3], target = 6 → [0, 1]
Follow-up: why must you check for the complement before storing the current value?
A hash map can store values you have already seen and their indices. Checking first prevents reusing the current index. Expected time is O(n) with a typical hash table; extra space is O(n). Discuss the average-case assumption rather than calling every map lookup unconditionally constant.
Choose one part to improve today
Complexity practice
Classify six examples, check your reasoning, and compare time with auxiliary space.
Start the free exercise →Read the complete problem
Capture constraints, examples, and starter code without losing context.
Read the screenshot guide →Practice spoken follow-ups
Keep one transcript, correct roles, and ask about a specific sentence.
Read the conversation guide →Compare your workflow
Use a practical checklist to evaluate Interview Roo and Interview Coder.
Read the comparison →Review with a simple rubric
- Could another person explain the problem after hearing your restatement?
- Did you give a reason for the data structure you chose?
- Did your complexity claim account for allocation, recursion, and nested work?
- Did you test the assumption most likely to fail?
- Could you answer the follow-up without starting over?
Interview Roo can help you keep screenshots, captions, answers, and saved session history together during preparation. Review generated answers for correctness. For a live assessment, follow its rules and use assistance only when permitted.