Data structures · Fill in the blank

In a blank, every parent holds a hash of its children's hashes. Two replicas compare their blank hashes first and descend only into the subtrees whose hashes differ.

medium Replication

Answer

In a Merkle tree, every parent holds a hash of its children's hashes. Two replicas compare their root hashes first and descend only into the subtrees whose hashes differ.

Also accepted: hash tree for Merkle tree.

Why

If the roots match, the replicas agree, after exchanging one hash. If not, they find the few differing ranges in a logarithmic number of steps. Git, Cassandra and blockchains all use the idea.

Review this in your daily deck All cards in Data structures