The Tail End

An easy 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
easy
Seniority
L3

Interview Prompt

Asking for the lowest value still saved has to stay cheap however many checkpoints have piled up and however many have been rolled back. We're replaying commands against a `Checkpoints` class, each a list with the command name first: `['push', 5]` saves a value, `['pop']` rolls back the newest save, `['peek']` reads the newest without removing it, and `['is_empty']` and `['min']` report on what is still saved, with one result back per command, in order.

Summary

Push, pop, peek. The basics that break people.

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