← Questions
Text editor in stages: buffer, undo and redo, autocomplete, collaboration
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Build the core of a text editor in four stages, each on top of the last, so keep the design easy to extend:
- A text buffer with insert and delete at a position.
- Undo and redo of those edits.
- Word autocomplete backed by a trie: given a prefix, suggest words already in the document.
- Collaborative editing: two users edit the same document at once, and their concurrent edits are reconciled with operational transformation so both end with the same text.
Most candidates do not reach the last stage, so keep the early stages simple and correct.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
