Implement an Idempotent Versioned Database Update
Company: ByteDance
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
Overview: Design an API operation that updates one database record safely under retries and concurrent writers. Make the API or object boundaries explicit, then cover invariants, edge cases, testing strategy, and operational trade-offs.