Skip to content
Tutorials Center
My learning

Topics

Lesson 73 of 77 ยท Practice

Practice: A Full Mock Interview Loop

Run a full mock interview loop at home: four timed rounds (coding, fundamentals, system design, behavioral) with questions, scoring guides and a score calculator.

Real interviews are not a list of separate questions. They are a loop: several back-to-back rounds, each with a different interviewer, a clock, and a hidden scorecard. The skill being tested includes stamina, switching between modes and recovering after a bad round. You cannot build those skills by reading, so this lesson gives you a complete mock loop to run yourself or with a friend: four timed rounds, a set of questions for each, and a scoring guide you can apply honestly.

The honest limit: nobody here is playing the interviewer, and no real technology is being run. The lesson is a script. You supply the pressure (a timer and an out-loud voice) and, ideally, a partner who reads the questions and scores you. The only code is a small JavaScript stand-in that builds your schedule and totals your scores, so the bookkeeping does not distract you. If you have not yet read how loops work, start with How Technical Interviews Work and A Framework for Answering Any Question.

The loop at a glance

Round 1 Coding, 45 minutes.
Round 2 Fundamentals, 40 minutes.
Round 3 System design, 50 minutes.
Round 4 Behavioral, 30 minutes.
1 / 2

Before you start

Set up a quiet space, a timer, a blank editor (no autocomplete or AI help) and paper for notes. Choose a role to aim at, such as "backend engineer" or "frontend engineer", because it decides what to emphasize. Record yourself on audio or video if you can bear it; listening back is the fastest way to find rambling and filler words. If a friend plays interviewer, give them this page and ask them to read questions aloud, stay silent while you think, give hints only when you ask, and fill in the scores.

The schedule below is generated by a small program. Change the start time or round lengths to match your own day.

JS Build your loop schedule

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Round 1: Coding (45 minutes)

Format. Read the problem, ask clarifying questions, explain the approach, code it, test it by hand, then discuss complexity. Plan roughly 5 minutes to clarify, 5 to plan, 20 to code, 10 to test and fix, 5 for follow-ups.

Problem A (pick one). Given a string, return the length of the longest substring without repeating characters. Example: "abcabcbb" gives 3. Follow-up: what if the input is a stream you cannot store?

Problem B. Design a class RecentCounter with ping(t) that returns how many pings happened in the last 3000 milliseconds (including t). Timestamps increase. Follow-up: what if memory is tight?

What a strong answer sounds like. For Problem A, name the sliding window with a hash map of last-seen positions, state O(n) time and O(k) space (k is the alphabet size), and test an empty string and a string of one repeated character. For Problem B, notice that a queue with removal from the front is enough, and that each timestamp is added and removed once, so the cost is O(1) amortized. See Array and String Patterns and Python: Classic Coding Questions.

Scoring guide (1 to 4).

  • 4: correct, clean code, tested without prompting, complexity stated correctly, handled follow-up.
  • 3: correct with minor bugs found and fixed by you, or needed one small hint.
  • 2: working idea but code incomplete or buggy at the end, needed several hints.
  • 1: no working approach, or could not explain what the code does.

Round 2: Fundamentals (40 minutes)

Format. Rapid questions on the languages and topics on your resume, each worth 3 to 4 minutes, with follow-ups that dig. Do all eight if you can; stop at the clock.

  1. In JavaScript, what is the difference between == and ===, and what does [] == false give? (types and coercion)
  2. What is a closure, and what goes wrong with var in a loop with callbacks? (scope and closures)
  3. Explain the order of output when a promise callback, a setTimeout(0) and synchronous code all run. (event loop)
  4. In Python, why is a mutable default argument dangerous, and what is the fix? (data model)
  5. What does the GIL change for threads versus processes? (OOP and the GIL)
  6. What is the difference between INNER JOIN and LEFT JOIN, and how do you find rows with no match? (SQL queries)
  7. What does an index speed up, and what does it cost? (indexes)
  8. What happens between typing a URL and seeing a page? (browser and networking)

What a strong answer sounds like. Short definition first, then a tiny example, then a pitfall. Example for question 7: "An index is a sorted structure, usually a B-tree, that lets the database find rows without scanning the table. It speeds up lookups, joins and sorts on the indexed columns, and costs extra storage and slower writes, because every insert and update must also update the index."

Scoring guide (1 to 4).

  • 4: at least seven answers correct and precise, with examples, and clear on at least one follow-up.
  • 3: five or six correct, minor gaps, honest "I am not sure, but I would check..." on the rest.
  • 2: three or four correct, or vague answers without examples.
  • 1: fewer than three, or confident wrong answers.

Round 3: System design (50 minutes)

Format. One open question. You drive. Use the order: requirements (5 minutes), estimates (5), high-level design (15), deep dive on one or two parts (15), bottlenecks and trade-offs (10).

Question. Design a service that sends notifications (email, push and SMS) to users for events such as "your order shipped". Assume 50 million users and bursts of 10,000 events per second during sales.

Prompts the interviewer may use. What happens if the email provider is down? How do you avoid sending the same notification twice? How do users control their preferences? How would you rate limit per user, and what about retries?

What a strong answer contains. An event comes into a queue so bursts are absorbed; workers read from per-channel queues, apply user preferences and templates, and call providers; failures retry with backoff and land in a dead-letter queue; an idempotency key per notification prevents duplicates; per-user and per-provider rate limits protect people and quotas; metrics track delivery rate and latency. Mention the trade-off between at-least-once delivery with deduplication and the impossibility of true exactly-once. Related lessons: System Design: The Building Blocks and System Design: Rate Limiters, Feeds and Chat.

Scoring guide (1 to 4).

  • 4: clarified requirements, sensible numbers, clean architecture, deep dive with trade-offs, handled failure questions.
  • 3: good architecture, thin on numbers or on failure handling.
  • 2: boxes drawn without reasons, or jumped into details with no requirements.
  • 1: could not structure the problem, or only named technologies.

Round 4: Behavioral (30 minutes)

Format. Four to five questions, 5 to 6 minutes each, answered with the STAR structure (situation, task, action, result) and a clear personal contribution.

  1. Tell me about a time you disagreed with a teammate. How did it end?
  2. Describe a project that failed or missed its goal. What did you learn?
  3. Tell me about the hardest bug you ever fixed.
  4. Describe a time you had to learn something quickly.
  5. Why this role, and why us?

What a strong answer sounds like. Two minutes, specific, first person ("I", not "we" for your own actions), a measurable result, and one honest reflection on what you would do differently. Prepare a story bank of five stories before you start so each question maps to a story. See Behavioral Questions and the STAR Method.

Scoring guide (1 to 4).

  • 4: specific stories with clear ownership, results and learning, crisp delivery.
  • 3: good stories with one weak part, such as no result or too long.
  • 2: generic answers ("I always communicate well") or stories with no clear role.
  • 1: blames others, cannot give an example, or contradicts earlier answers.

Score the loop

When the loop ends, give each round a score from 1 to 4. The calculator below weights the rounds the way many teams do (coding and design count most), prints a rounded result for each round, and gives an overall recommendation. The thresholds are a rule of thumb, not a standard. Real companies decide by discussion, and a single weak round can sink an otherwise good loop, which is why the program also flags any round scored 1.

JS Score calculator for your mock loop

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Change the numbers in scores to your own results. With the sample scores, the weighted average is 2.85, a borderline result pointing at system design as the next focus. The weights are an assumption you can change to match the role you want: a front-end role might weight fundamentals more heavily.

After the loop: the debrief

Within an hour, while it is fresh, write down for each round: what went well, where you froze, which question you did not know, and one concrete action. Then sort the actions: review a lesson, redo a problem, or practice the delivery. If you recorded the session, listen to the system design round at double speed and count how many times you said "um" or went silent for more than ten seconds. Repeat the loop in one to two weeks with new questions from the earlier lessons and compare scores. Progress shows up faster in the delivery (structure, pace, testing out loud) than in raw knowledge.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why take a break between rounds in a mock loop?

    The loop tests stamina and switching modes. A short break mirrors real conditions, where you must reset between interviewers.
  2. 2. In the system design round, what should come before drawing boxes?

    Requirements and estimates decide the design. Boxes without them are guesses, and interviewers score that low.
  3. 3. A STAR answer should emphasize which of these?

    Interviewers want your personal contribution and the outcome. Use I for what you did, and finish with a result and a lesson.
  4. 4. You score 1 in one round and 4 in the others. What does the calculator suggest?

    Many hiring decisions treat a clearly failed round as a blocker, so the fix is to practice that round before repeating the loop.

Summary

  • A loop tests stamina and mode switching, so practice rounds back to back with breaks.
  • Four rounds: coding (45 minutes), fundamentals (40), system design (50), behavioral (30).
  • Each round has a scoring guide from 1 to 4; score yourself or ask a partner right after.
  • Use a framework in every round: clarify, plan, build, test, state the cost.
  • Debrief within an hour, then repeat the loop in one to two weeks with new questions.
  • The weighted calculator is only a rule of thumb; the useful output is the name of your weakest round.

Next: Questions to Ask Your Interviewer.