CodeGround
DashboardProblemsInterviewsAssessmentsCourses
CodeGround
DashboardProblemsInterviewsAssessmentsCourses

Sample report

Coding interview debrief

A fictional example of your post-interview report. How reports work.

Overview

Overall

74/ 100

Lean hire · Strong band

Medium bar

Strong problem solver for mid level. Testing discipline is the gap.

Reached the optimal sort-and-sweep approach for Merge Intervals with one minor nudge and stated complexity correctly without being asked. On Top K Frequent Elements you chose a size-k heap and explained the tradeoff against bucket sort, but time ran out before ties were handled, and the final code failed 2 of 14 tests. Most bugs were found by the test runner or the interviewer rather than by tracing.

Problems
1 solved · 1 partial
Tests
30 / 32 passed
Hints
1 minor
Duration
45:00 of 45:00

Dimension scores

Problem understanding & clarification3/4At barApproach & algorithm design3/4At barComplexity analysis4/4Above barImplementation quality3/4At barTesting & debugging2/4Below barCommunication3/4At bar

Problem understanding & clarification

3/4At bar

Asked the questions that mattered on both problems before designing, though the empty-input case slipped through on Merge Intervals.

1:12·You said·Strength
“Should intervals that only touch, like one to three and three to five, be merged into one?”
Resolved the boundary question that decides < versus <= before writing any code.
25:30·You said·Strength
“If two numbers have the same frequency, does the order between them matter?”
Spotted the tie-breaking requirement on Top K early.

How to improve. Add empty and single-element inputs to your clarification checklist. You asked about boundaries, not about size.

Approach & algorithm design

3/4At bar

Reached sort-and-sweep independently and explained why sorting by start makes one pass sufficient. For Top K you chose a heap over the linear bucket-sort approach.

6:05·You said·Strength
“Once they're sorted by start, any overlap has to be with the last interval I merged, so one pass is enough.”
Stated the invariant that makes the greedy pass correct.
27:48·You said·Strength
“Bucket sort gets this to linear time, but the heap keeps memory at k, which matters if the input is huge.”
Compared a real alternative and named the tradeoff, then picked the slower option without a constraint that required it.

How to improve. When the constraints don't say otherwise, commit to the asymptotically optimal approach and raise the memory tradeoff as a follow-up.

Complexity analysis

4/4Above bar

Correct, justified time and space for both solutions, offered without prompting.

21:40·You said·Strength
“Sorting dominates, so n log n time, and the output can hold all n intervals, so linear space.”
Correct time and space for the code as written, with the reason.
38:15·You said·Strength
“Counting is linear and each heap push is log k, so n log k overall.”
Accurate, and connected back to the earlier bucket-sort comparison.

How to improve. Keep doing this. Next, mention how sorting in place versus sorting a copy changes the space bound.

Implementation quality

3/4At bar

Readable, idiomatic Python on both problems. The first Merge Intervals draft indexed into a possibly empty list.

12:30·Your code·Concern
merged = [intervals[0]]
Raises IndexError on an empty input. Fixed after the interviewer pointed at this line.
35:02·Your code·Strength
counts = Counter(nums)
Used the standard library instead of hand-rolling a frequency map.

How to improve. Before running, reread your first and last few lines with an empty input in mind.

Testing & debugging

2/4Below bar

Relied on the test runner to find bugs. Neither the empty-input failure nor the tie-ordering failures were caught by tracing.

18:31·Interviewer·Concern
“Good. Now look at line 3. What does it do with an empty list?”
The key edge case was surfaced by the interviewer, not by your own testing.
41:20·You said·Concern
“Let me just run it and see what breaks.”
Ran the suite instead of tracing the tie case you had asked about at 25:30.

How to improve. Before each run, name two inputs you expect to break your code and trace one by hand.

Communication

3/4At bar

Kept the interviewer oriented and checked in at decision points, with one long silent stretch while implementing Top K.

9:14·You said·Strength
“I'm going to write the sweep first and come back to the sort key, does that sound okay?”
Checked in at a decision point and kept the interviewer oriented.

How to improve. During long implementation stretches, say what the next few lines will do before typing them.

Problem breakdown

P1Merge IntervalsMedium·Solved0:00 – 24:40

Tests

18 / 18

Complexity

O(n log n) time

Stated correctly

Optimal

Yes

Hints

1 minor

First pass at 19:52

Approach

Sort by start, then sweep once, extending the last merged interval whenever the next one overlaps it.

Sorting dominates; the output can hold all n intervals.

Key moments

  1. 1:12+Clarified whether touching intervals merge
  2. 6:05+Stated the invariant behind the sweep
  3. 18:31−Empty input surfaced by the interviewer
  4. 19:52First fully passing run
  5. 21:40+Complexity stated without prompting
Final code1 review comment
1def merge(intervals: list[list[int]]) -> list[list[int]]:
2 intervals.sort(key=lambda x: x[0])

Nitsort() mutates the caller's list. Use sorted() or call out the side effect.

3 if not intervals:
4 return []
5 merged = [intervals[0]]
6
7 for start, end in intervals[1:]:
8 last = merged[-1]
9 if start <= last[1]:
10 last[1] = max(last[1], end)
11 else:
12 merged.append([start, end])
13
14 return merged
  • Updating the last merged interval in place keeps the loop to a single comparison.
P2Top K Frequent ElementsMedium·Partially solved24:40 – 45:00

Tests

12 / 14

Complexity

O(n log k) time

Stated correctly

Optimal

No

Hints

None

Never fully passing

Approach

Counted frequencies, then kept a size-k min-heap of (count, value) pairs and returned it sorted by count.

Correct for the heap approach. Bucket sort reaches O(n).

Key moments

  1. 25:30+Asked how ties should be ordered
  2. 27:48+Compared the heap with bucket sort
  3. 31:00−Two-minute silent stretch
  4. 41:20−Ran the suite instead of tracing the tie case
  5. 45:00Time ran out with 12 of 14 passing

Failing tests

  • Ties keep first-seen order
  • Negative values with equal counts
Final code2 review comments
1import heapq
2from collections import Counter
3
4def top_k_frequent(nums: list[int], k: int) -> list[int]:
5 counts = Counter(nums)
6 heap = []
7 for value, count in counts.items():
8 heapq.heappush(heap, (count, value))

MajorHeap entries fall back to comparing values on equal counts, so ties come out in numeric order instead of first-seen order.

9 if len(heap) > k:
10 heapq.heappop(heap)
11 return [value for _, value in sorted(heap, reverse=True)]

Minorsorted(..., reverse=True) reorders ties again. Sort by count only, or carry the first-seen index.

  • Counter with a bounded heap is idiomatic and easy to follow.

Strengths and next steps

Strengths

  • Clarifies before coding

    You asked the boundary question on both problems before designing, and it shaped the comparison you wrote.

  • Explains why, not just what

    You stated the invariant behind the sweep and justified both complexity bounds without being asked.

  • Weighs alternatives

    Comparing the heap with bucket sort showed you know when memory can matter more than asymptotics.

Improvements

  • Test before you run

    Both bugs in this session were found by the runner or the interviewer, not by you.

    Drill. For your next five problems, write two inputs you expect to break your code before the first run, and trace one by hand.

  • Default to the optimal approach

    On Top K you chose O(n log k) when O(n) was available and the constraints did not favor memory.

    Drill. Re-solve Top K Frequent Elements with bucket sort, keeping ties in first-seen order.

  • Narrate long stretches

    There was a two-minute silent stretch while you implemented Top K.

    Drill. In your next mock, say what the next three lines will do before typing them.

Get a report on your own interview.

Start a free interview

© 2026 CodeGround

ProblemsHow we evaluateSample reportTermsPrivacyBillingRuntimesSupportContact