Build a Merkle Tree over a Directory with Hash Lookup and Tree Diff

Read the full interview experience this question came from →

Quick Overview

Implement a Merkle tree over a real directory in Python, with N-ary directory nodes, a build method, a hash lookup by path, and a diff that compares two trees, and write the tests yourself. It tests deterministic hashing design, file-system traversal, pruning identical subtrees, and disciplined testing under time pressure.

Build a Merkle Tree over a Directory with Hash Lookup and Tree Diff

Company: Cursor

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

Overview: Implement a Merkle tree over a real directory in Python, with N-ary directory nodes, a build method, a hash lookup by path, and a diff that compares two trees, and write the tests yourself. It tests deterministic hashing design, file-system traversal, pruning identical subtrees, and disciplined testing under time pressure.

Read the full Cursor Software Engineer interview experience this question came from

Cursor logo
Cursor
Sep 16, 2026
mediumSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
54
0
Loading...