Mock Coding Interview: Merge Intervals (with a Real Engineer)

Опубликовано: 29 Июль 2026
на канале: abrar
1,152
11

Watch a live mock coding interview where a real software engineer is given Merge Intervals — one of the most common coding interview problems asked at top tech companies. This unscripted session shows exactly how a candidate thinks through the problem, catches bugs in real time, and navigates interviewer feedback under pressure.

The interview starts with the interviewer offering multiple problems. The candidate recognizes Merge Intervals but accepts the challenge of solving it with a different approach than before — no stack, no extra space beyond the result list. You'll see the full problem-solving arc: sorting intervals by start time, building merge logic with a running pointer, catching a critical logic error where two mutually exclusive conditions were nested incorrectly, and debugging through real test cases.

0:00 Problem selection and setup
0:30 Candidate recognizes Merge Intervals
1:30 Problem explanation and overlap rules
2:45 Solution approach: sort by start, merge overlapping
3:30 Initial stack-based idea
5:00 Interviewer challenges: solve without a stack
6:30 Building the pointer-based merge logic
9:00 Interviewer catches logic bug (mutually exclusive conditions)
10:00 Debugging and fixing the overlap check
12:00 Running test cases and verifying output
13:15 Walkthrough of example: [1,3], [2,6], [8,10], [15,18]
14:00 Interviewer feedback and wrap-up