Real-time collaboration works like magic until two users edit the same line simultaneously. Under the hood, an algorithm must decide whose change wins and get it right every time.

Software engineers faced this problem and two major approaches emerged: Operational Transforms (OT) and Conflict-Free Replicated Data Types (CRDTs). The choice...