Text Editor in Four Stages: Buffer, Undo/Redo, Trie Autocomplete, Collaborative OT
Company: OpenAI
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: hard
Interview Round: Onsite
Overview: Build a text editor in four stages: a buffer with insert, delete and read, undo and redo with two stacks, trie-based autocomplete ranked by word frequency, and real-time collaborative editing with operational transformation. It tests data structure choice, reversible operations, top-k retrieval and concurrency correctness.