PracHub
QuestionsLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Databricks

Design Snapshot Set Iteration and Clarify Durable Writes

Last updated: Aug 1, 2026

Quick Overview

Design a mutable set whose iterators preserve an exact, deterministic creation-time snapshot, then frame the missing requirements for a separate durable-writer exercise. Discuss mutation and concurrency, iterator lifetime, old-state cleanup, acknowledgment boundaries, crash and device failures, ordering, idempotency, recovery, and storage ownership.

  • hard
  • Databricks
  • Software Engineering Fundamentals
  • Software Engineer

Design Snapshot Set Iteration and Clarify Durable Writes

Company: Databricks

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Onsite

Work through a snapshot-set iterator and then explain how you would clarify a separate durable-writer exercise whose detailed contract has not been preserved. ### Part 1: Snapshot Set Iterator Design a mutable set with `add`, `remove`, and `iterator`. An iterator must enumerate exactly the elements present at the instant the iterator is created. Later additions and removals must not change that iterator's result. Each snapshot must return every captured element once, in a documented deterministic order. #### What This Part Should Cover - Snapshot semantics and iterator lifetime - A simple copy-on-iterator design - Alternatives such as versions, copy-on-write, or persistent structures - Complexity and concurrent-access assumptions ### Part 2: Durable Writer Requirement Discovery The only surviving description of a second exercise is "durable data writer." Before proposing code, list the questions needed to establish its contract. Organize them around acknowledgment, crash behavior, ordering, concurrency, recovery, and storage ownership. Explain how different answers would change the design. #### What This Part Should Cover - What "durable" means at the acknowledgment boundary - Process crash versus machine or device failure - Append, overwrite, batching, and ordering semantics - Idempotency and recovery format - Why guessing a missing contract would be unsafe ### What a Strong Answer Covers A strong answer gives a correct simple snapshot implementation before optimizing it and treats the incomplete durable-writer prompt as a requirements problem rather than inventing hidden APIs. ### Follow-up Questions - How would you reclaim old snapshot versions? - What changes when writers and iterators run concurrently? - Which durability guarantees can an application make without filesystem and hardware assumptions?

Quick Answer: Design a mutable set whose iterators preserve an exact, deterministic creation-time snapshot, then frame the missing requirements for a separate durable-writer exercise. Discuss mutation and concurrency, iterator lifetime, old-state cleanup, acknowledgment boundaries, crash and device failures, ordering, idempotency, recovery, and storage ownership.

Related Interview Questions

  • Build a Durable Key-Value Cache - Databricks (medium)
  • Implement Resilient Autocomplete Data Fetching - Databricks (medium)
  • Design a Cache with Hit Counts - Databricks (hard)
  • Design a multi-threaded synchronous log writer - Databricks (hard)
|Home/Software Engineering Fundamentals/Databricks

Design Snapshot Set Iteration and Clarify Durable Writes

Databricks logo
Databricks
Jul 26, 2026, 12:00 AM
hardSoftware EngineerOnsiteSoftware Engineering Fundamentals
5
0

Work through a snapshot-set iterator and then explain how you would clarify a separate durable-writer exercise whose detailed contract has not been preserved.

Part 1: Snapshot Set Iterator

Design a mutable set with add, remove, and iterator. An iterator must enumerate exactly the elements present at the instant the iterator is created. Later additions and removals must not change that iterator's result. Each snapshot must return every captured element once, in a documented deterministic order.

What This Part Should Cover Guidance

  • Snapshot semantics and iterator lifetime
  • A simple copy-on-iterator design
  • Alternatives such as versions, copy-on-write, or persistent structures
  • Complexity and concurrent-access assumptions

Part 2: Durable Writer Requirement Discovery

The only surviving description of a second exercise is "durable data writer." Before proposing code, list the questions needed to establish its contract. Organize them around acknowledgment, crash behavior, ordering, concurrency, recovery, and storage ownership. Explain how different answers would change the design.

What This Part Should Cover Guidance

  • What "durable" means at the acknowledgment boundary
  • Process crash versus machine or device failure
  • Append, overwrite, batching, and ordering semantics
  • Idempotency and recovery format
  • Why guessing a missing contract would be unsafe

What a Strong Answer Covers Guidance

A strong answer gives a correct simple snapshot implementation before optimizing it and treats the incomplete durable-writer prompt as a requirements problem rather than inventing hidden APIs.

Follow-up Questions Guidance

  • How would you reclaim old snapshot versions?
  • What changes when writers and iterators run concurrently?
  • Which durability guarantees can an application make without filesystem and hardware assumptions?
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Databricks•More Software Engineer•Databricks Software Engineer•Databricks Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.