Mock Interview
Four self-guided prompts you can run today. Treat each as a timed drill: 45 minutes for coding, 5 minutes for behavioral, 50 minutes for system design. Record yourself, review against the rubric, then iterate. Interactive text-mode sessions ship for Pro subscribers. Voice-mode ships for Elite in Phase 2.
Integrity note. LeetPrep Studio mock sessions are for self-directed study. If a current or prospective employer is running the session or watching, this platform refuses to run. See the
Acceptable Use Policy for details.
codingphone
Array manipulation, warm-up round
Given an array of integers, return the length of the longest contiguous subarray containing at most two distinct values. Example: [1,2,1,3,2] -> 3 (the subarray [2,1,3] fails because it has three distinct, but [1,2,1] has two distinct, length 3). Aim for linear time. Narrate your thinking aloud from the first second.
Show self-scoring rubric
- +Clarified constraints within ninety seconds (array size, value range, output format).
- +Named the pattern (sliding window) before coding.
- +Wrote running code within fifteen minutes.
- +Stated time and space complexity without being prompted.
- +Traced the algorithm through at least one test case.
codingonsite-coding
Tree recursion, onsite-grade
Given the root of a binary tree, return the maximum path sum. A path is any sequence of nodes where each adjacent pair is parent-child. The path does not need to include the root. Node values can be negative. Aim for linear time and space proportional to tree height.
Show self-scoring rubric
- +Recognized post-order recursion shape.
- +Correctly handled negative values (choosing to not extend).
- +Maintained a global best while returning a local contribution.
- +Did not over-count the central node.
- +Traced the algorithm through a tree with mixed positive and negative values.
behavioralbar-raiser
Disagreement with a senior stakeholder
Tell me about a time you disagreed with a senior stakeholder. What did you do, and what was the outcome? Use the STAR framework (Situation, Task, Action, Result).
Show self-scoring rubric
- +Situation framed in under one minute.
- +Specific numbers in the Result (scope, duration, impact).
- +Action is yours, not the team's. Uses 'I' not 'we' for the key move.
- +Tied back to a principle if interviewing at Amazon, or a value if interviewing at Meta.
- +Total answer under four minutes, leaving room for follow-ups.
system-designonsite-sd
Design a URL shortener
Design a URL shortener at the scale of bit.ly. Thousand shortens per second at peak. Ten thousand redirects per second at peak. Ninety-nine-point-nine percent availability. Latency: p95 redirect under fifty milliseconds.
Show self-scoring rubric
- +Asked clarifying questions about scale, latency, durability before drawing boxes.
- +Did the capacity math: storage growth per day, read-write ratio, cache hit rate assumption.
- +Proposed a short-code generator (hash+base62, or counter+base62) and defended the choice.
- +Separated write path (shorten) from read path (redirect) with a cache.
- +Addressed at least one operational concern (analytics, abuse detection, custom domains).
Want interactive mock sessions?
Pro subscribers get text-mode interactive mock interviews with follow-up questions, hint scaffolding, and an exportable tamper-evident receipt. Elite subscribers get voice-mode mock interviews.
Practice with the Free Library