Skip to content

Build a Diff Tool

Build the algorithm behind git diff: edit distance, longest common subsequence, edit scripts, unified diff format with context hunks, patience diff for code-friendly output, and patch application. The foundation of every version control system and code review tool.

intermediate10 lessons4 chapters10 graded exercisesPython

No sign-up needed for lesson 1 · certificate on completion · sign up to save progress

What you’ll have built

Chapter by chapter. Every step is a graded exercise.

  • Edit Distance
  • Edit Scripts
  • Diff Output
  • Production
Starts in Python — solve in the language you choose in the editor, same tests either way.

Curriculum

4 chapters, 10 lessons. Each lesson is a short read, one graded exercise, and a quiz.

  1. 1Edit DistanceRead · exercise · quiz
  2. 2Longest Common SubsequenceRead · exercise · quiz
Loading reference solution…