Implement a Merkle Tree for Repository Contents
Implement a Merkle tree over the contents of a cloned repository. The tree should allow a client and server to compare repository state efficiently by exchanging hashes rather than every file. Describe the data model, construction algorithm, update path, and the client/server protocol you would implement.
AI interview prep
Core dilemma
Balancing the efficiency of hash-based state comparison against the complexity of maintaining and synchronizing a Merkle tree in a potentially dynamic environment.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Implement a Merkle Tree for Repository Contents
Implement a Merkle tree over the contents of a cloned repository. The tree should allow a client and server to compare repository state efficiently by exchanging hashes rather than every file. Describe the data model, construction algorithm, update path, and the client/server protocol you would implement.