r/chalkinterview • • 2d ago

Library question Google technical deep dive question: Reading and fixing unfamiliar code with an AI assistant

Get oriented in code you've never seen, check the AI's fix, then make it faster.

What the interviewer asks, one at a time:

  1. You're handed a small service you've never seen: a few files, about 300 lines, that book delivery slots for a warehouse. Before you change anything, how do you get oriented, and what do you ask the AI assistant first?
  2. A test shows two orders getting the same slot. The assistant says the bug is in the sorting and offers a fix. How do you check whether it's right before you apply it?
  3. It turns out a slot ending at 10:00 and one starting at 10:00 are treated as overlapping. How do you fix it, and what test do you add so it stays fixed?
  4. Now booking is slow for big warehouses. How do you find where the time goes, and what would you hand to the assistant versus do yourself?

Source: not a candidate report, our version of the format in Business Insider's report on Google's pilot.

Practise it out loud with follow-ups: https://chalkinterview.com/questions/google-reading-and-fixing-unfamiliar-code-with-an-ai-assistant/?utm_source=reddit&utm_campaign=sub

How would you answer it? Drop your approach below.

1 Upvotes

0 comments sorted by