Carry the One

A medium Python mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.

Domain
Python
Difficulty
medium
Seniority
mid

Interview Prompt

We store counters too big for 64 bits as lists of chunks, each chunk one digit in base 1,000,000,000, index 0 the lowest. Subtracting `b` from `a` the way you would on paper, return the indices of the columns that have to borrow.

Summary

In grade-school subtraction you scribble a mark each time you borrow. Recover those marks.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write and run your Python against test cases
  4. Answer the interviewer's follow-up questions, then get a hire or no-hire decision