Serialize and Restore an In-Memory Key-Value Store
Company: OpenAI
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
Overview: Define a deterministic binary format for serializing an in-memory store with arbitrary UTF-8 string keys and values, then outline encoding and decoding. The decoder must reject malformed, truncated, oversized, duplicate, or trailing input safely.