Code-with-AI Interviews Are Here: How to Pass When You’re Allowed to Use AI
3 mins read

Code-with-AI Interviews Are Here: How to Pass When You’re Allowed to Use AI

AI Coding Interviews

The AI writes the code. You get scored on everything else.

A few years ago, using AI in a coding interview would get you disqualified. Now a growing number of companies hand you an AI assistant and say: go ahead, use it.

The first time I ran one of these rounds, I expected it to be easier for candidates. It wasn’t. Most people who struggled didn’t fail because the AI wrote bad code. They failed because they stopped thinking the moment the AI started typing.

Here’s what these rounds actually test, a worked example, and the loop I teach my mentees.

What’s different about a code-with-AI round

In a classic coding round, the interviewer watches you write code from scratch. In a code-with-AI round, writing the code is the cheap part. The AI can do it in seconds.

So the interviewer watches something else: how you direct, check and own the code.

Think of it like this. You’re not the typist anymore. You’re the senior engineer reviewing a fast, confident junior who is sometimes wrong.

What interviewers actually score

  1. Problem understanding. Did you clarify the problem before prompting? Inputs, edge cases, constraints.
  2. Direction. Did you break the problem into steps, or paste the whole question and hope?
  3. Verification. Did you test the AI’s code, or just accept it because it looked right?
  4. Ownership. Can you explain every line? If the interviewer points at a line and asks “why?”, “the AI wrote it” is the wrong answer.
  5. Communication. Did you talk through your thinking while the AI was working?

Notice that “did the code work” isn’t on the list. It matters, but it’s the minimum, not the score.

A worked example: merge overlapping meetings

The problem: you’re given a list of meetings as [start, end] pairs. Merge the ones that overlap.

Input:  [[1, 3], [8, 10], [2, 6], [15, 18]]
Output: [[1, 6], [8, 10], [15, 18]]

Step 1: clarify before prompting. I’d ask the interviewer two questions out loud:

  • Is the input sorted? (No.)
  • Do meetings that touch count as overlapping, like [1, 4] and [4, 5]? (Yes, merge them.)

That second question matters later.

Step 2: a focused prompt. Not “solve this problem”, but:

Write a Python function merge(meetings) that merges overlapping intervals. The input is not sorted. Intervals that touch, like [1, 4] and [4, 5], should be merged. Return the merged list sorted by start time.

Step 3: read what comes back. Here’s a typical answer:

def merge(meetings):
meetings.sort(key=lambda m: m[0])
result = []
for start, end in meetings:
if result and start < result[-1][1]:
result[-1][1] = max(result[-1][1], end)
else:
result.append([start, end])
return result

It looks right. It sorts, it loops, it handles the main case. Most candidates would move on here.

Step 4: test the edge case you clarified. Before saying “done”, I write two quick tests:

assert merge([[1, 3], [8, 10], [2, 6], [15, 18]]) == [[1, 6], [8, 10], [15, 18]]
assert merge([[1, 4], [4, 5]]) == [[1, 5]] # touching intervals

The second test fails. The function returns [[1, 4], [4, 5]].

The bug is one character: start < result[-1][1] should be start <= result[-1][1]. The AI ignored the "touching intervals" part of the prompt. This happens a lot: it writes the most common version of a solution, not always the one you asked for.

Step 5: fix it, and say why out loud.

if result and start <= result[-1][1]:   # touching counts as overlapping

And one more thing worth mentioning: meetings.sort() changes the caller's list. In an interview, I'd say "this sorts the input in place; if the caller needs the original order, I'd use sorted(meetings, …) instead." That one sentence shows you own the code.

The time and space: O(n log n) for the sort, O(n) for the output. You should be able to say this without asking the AI.

That whole example is the round in miniature: clarify, direct, verify, fix, explain.

Five mistakes I see a lot

  1. Pasting the whole problem in. You skip the part they’re scoring (understanding) and get generic code back.
  2. Accepting code you can’t explain. If you don’t understand a line, ask the AI to explain it, or rewrite it simply. Never leave a mystery line in.
  3. Not writing tests. The AI’s code almost always passes the example in the problem. Bugs live in the edge cases you clarified.
  4. Going silent while the AI types. Those seconds are free time to talk: “while this generates, I’m thinking about the empty-list case.”
  5. Over-engineering. AI loves adding classes, type hints and abstractions. In a 45-minute round, simple and correct beats impressive.

The 4-step loop I use

Clarify → Plan → Generate small → Verify

  1. Clarify inputs, edge cases and constraints with the interviewer. Write the edge cases down.
  2. Plan the approach in one or two sentences before prompting. “Sort by start time, then merge in one pass.”
  3. Generate small. Ask for one function or one step at a time, with the constraints in the prompt.
  4. Verify with tests for the edge cases from step 1. Read every line. Fix, then explain.

Then repeat for the next part of the problem.

How to practise this week

  • Do 3 problems with an AI assistant, but write the tests first. Notice how often the AI’s first answer fails one of them.
  • Explain AI-written code out loud for 2 minutes, as if to an interviewer. If you get stuck on a line, that’s the line they’d ask about.
  • Do one round with a friend watching, and ask them to interrupt with “why?” at random moments.

The one line to remember

The AI writes the code. You’re scored on understanding, direction, verification and ownership.

What’s your experience been? Have you had a code-with-AI round yet? Tell me in the comments.

If you’re preparing for code-with-AI interviews or agentic AI system design rounds, you can book a free 15-minute call at cracktech.app.

More from me: Back-of-the-Envelope Estimation: The 1⁰⁵ Trick · YouTube


Code-with-AI Interviews Are Here: How to Pass When You’re Allowed to Use AI was originally published in Stackademic on Medium, where people are continuing the conversation by highlighting and responding to this story.

PakarPBN

A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.

In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.

The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.

Streaming Film

Nonton Film gratis

Jasa Backlink

Download Anime Batch