Home › Coding Interview

New Coding interview walkthrough

A real coding interview, start to finish

A Merge Intervals question, then a debugging round. Watch CoPilot Interview caption the question, write clean Python in about 2 seconds, and read buggy code off the screen into a bug table: line, error, reason, fix.

Dramatization: the interviewer and the candidate are AI-generated actors; the CoPilot Interview footage is a real screen recording of the app.

What happens in the video

Sarah, the interviewer, runs a two-part technical round over a video call and a shared coding pad. Jake, the candidate, has CoPilot Interview open next to the pad. Each step below links to the moment in the video.

The coding question

Sarah pastes Merge Intervals into the pad and reads it out. With Coding mode on, the app shows the question as live captions while she speaks.

One click: Code answer

A working Python solution arrives in about 2 seconds, with the approach and the time and space complexity on top and an example run below.

The debugging question

Sarah pastes a binary search that never returns for some inputs. Jake turns on Debug code and uses Read screen, so the app reads the code straight off the pad.

The bug table

The answer is a table with the line, the error, why it fails and the fix, then the corrected lines. Jake explains the fix in his own words and the tests pass.

Coding question: Merge Intervals

Given a list of intervals [start, end], merge every overlapping pair and return the intervals that remain. For example, [[1,3],[2,6],[8,10],[15,18]] becomes [[1,6],[8,10],[15,18]], and intervals that touch, like [1,4] and [4,5], merge too.

The approach the app gives and Jake explains: sort the intervals by their start, then walk through them once. If the next interval starts before the last merged one ends, extend that end; otherwise, add it as a new interval.

def merge(intervals):
    if not intervals:
        return []

    intervals.sort(key=lambda x: x[0])
    merged = [list(intervals[0])]

    for current in intervals[1:]:
        last = merged[-1]
        if current[0] <= last[1]:
            last[1] = max(last[1], current[1])
        else:
            merged.append(list(current))

    return merged

Complexity: O(n log n) time for the sort and O(n) space for the output.

Debugging question: a binary search that never finishes

binary_search(nums, target) should return the index of target in a sorted list, or -1. On [1, 3, 5, 7, 9] with target 9, the loop runs forever.

def binary_search(nums, target):
    left, right = 0, len(nums) - 1
    while left <= right:
        mid = (left + right) // 2
        if nums[mid] == target:
            return mid
        elif nums[mid] < target:
            left = mid        # line 8
        else:
            right = mid       # line 10
    return -1

With Debug code on, the app answers with a bug table:

LineErrorReasonFix
8left = midWhen nums[mid] < target, the next search still includes mid, so the bounds can stop shrinking.left = mid + 1
10right = midWhen nums[mid] > target, the next search still includes mid, so the bounds can stop shrinking.right = mid - 1

Once mid has been checked it must leave the search range. With both bounds moving past it, every pass makes progress, and the two tests return 4 and -1.

How CoPilot Interview helps in a coding round

💻 Coding mode

Answers come back as working code in your language, with the approach and the complexity on top and an example run below. Turn on Note or No comments to shape the code.

🐞 Debug code

For debugging rounds: a bug table with the line, the error, why it fails and the fix, followed by the corrected lines.

🖥 Read screen

Reads the problem or the code on your screen, so nothing has to be retyped before you get an answer.

More detail: coding interview help, the coding interview cheat sheet, and AI mock interviews to rehearse a round first.

FAQ

Is this a real interview?

It is a dramatization. The interviewer and the candidate are AI-generated actors with synthetic voices. The CoPilot Interview footage is a real screen recording of the desktop app answering both questions.

Which programming languages does Coding mode support?

You pick the language once, and Coding mode answers in it. The video uses Python; the app offers 40 programming languages, including JavaScript, TypeScript, Java, C++, C#, Go, Rust and SQL.

What is the difference between Coding mode and Debug code?

Coding mode turns a question into a working solution with the approach and complexity on top. Debug code is for debugging rounds: it reads the code you were given and returns a bug table with the line, the error, the reason and the fix, followed by the corrected lines.

Is CoPilot Interview free?

Yes. You get 15 free minutes a day on Windows and macOS, with no account needed to start.

Can I practice a coding round before the real one?

Yes. Mock Interview builds questions from your résumé and the job description, asks them out loud and scores every answer out of 10, so you can rehearse a coding round first.

Try it on your next coding round

Free 15 minutes a day on Windows and macOS. Practice first with Mock Interview.

Download free Try a mock interview

Follow the rules of the employer you're interviewing with.