When a mobile client or database node goes offline and keeps working, its local copy of the data drifts away from the server's copy β but re-syncing shouldn't mean comparing every single record over the network. This simulator builds two Merkle trees, one per replica, where every leaf hashes a record and every internal node hashes its children. Take Replica A offline, let random edits accumulate on it, then run the sync: the algorithm walks both trees from the root and prunes any subtree whose hash still matches, only descending into branches that actually diverged and only transferring the handful of leaf records that changed. Live counters compare the number of hash comparisons actually performed against a naive full linear scan, showing exactly why this is the mechanism real distributed databases (Cassandra, DynamoDB, CouchDB) use for anti-entropy repair.