---
title: 'Most Engineers Get This Wrong in an Interview'
source: 'https://youtube.com/watch?v=rXgqzbkN6NU'
video_id: 'rXgqzbkN6NU'
date: 2026-08-04
duration_sec: 83
---

# Most Engineers Get This Wrong in an Interview

> Source: [Most Engineers Get This Wrong in an Interview](https://youtube.com/watch?v=rXgqzbkN6NU)

## Summary

The video explains three strategies for handling concurrent edits in collaborative applications: last write wins, operational transform (OT), and CRDTs. It highlights how Google Docs uses OT and Figma uses CRDTs, emphasizing the trade-offs between simplicity, data loss, and offline support.

### Key Points

- **The Interview Question** [00:02] — Senior engineers often fail to explain what happens when two users edit the same document simultaneously. The answer varies by application.
- **Last Write Wins** [00:16] — A naive approach where the last save overwrites the other. Simple but causes data loss, so most production systems avoid it.
- **Operational Transform (OT)** [00:31] — Used by Google Docs. Edits are transformed based on concurrent changes, so insertions shift appropriately. Requires a central server.
- **CRDTs** [00:45] — Used by Figma. Each character has an ID and position, allowing devices to merge edits independently without a central server, even offline.
- **Further Learning** [01:14] — The video promotes a full video for deeper dives into OT and CRDTs.

### Conclusion

The video succinctly contrasts three concurrency control strategies, showing that while last write wins is simple, OT and CRDTs offer better data integrity and offline support, with OT relying on a server and CRDTs being decentralized.

## Transcript

of senior engineers can't explain in an interview. You and a friend are editing the same document. You both type in the exact same spot at the exact same time. What happens next? Every collaborative application answers this differently.
Let me show you three main strategies. The first is a naive last write wins. If two people edit the same thing, whoever saves last overwrites the other. It's really simple, but you lose data. That's why most production systems don't use
it. The next is operational transform. This is what Google Docs uses. Instead of overriding, it takes every edit and adjusts it based on what everyone else did. So, if your friend inserts a character before your edit, your edit
automatically shifts over to the right place. The last is CRDTs. This is similar to what Figma uses. Instead of a central server transforming every edit like operational transform, each user's device figures it out on its own. Every
character gets an ID and a position baked in from the moment it's created. So, no matter what order edits arrive, even if you were offline for an hour, everything merges to the same result automatically. If you want to go deep on
OT and CRDTs, check out our full video for more.
