DFIELDSOLUTIONS

Free software

LabDelta: See exactly what changed

An LCS dynamic program + a forward backtrack into an equal/add/del edit script - the algorithm behind git diff, from scratch. 7 tests incl. the reconstruction invariant.

Free software1 sections · 2 min readBy Dezső Mező.mdFree softwareDelta

Delta computes the difference between two texts using the same algorithm that powers git diff, built from scratch. It runs a longest-common-subsequence dynamic program, then backtracks forward through the table to produce an edit script of equal, add, and delete operations. It is a from-scratch, dependency-light build - with 7 tests including the reconstruction invariant - that you can download and run locally.

01About the app

A classic algorithm

What to take away

  • An LCS dynamic program + a forward backtrack into an equal/add/del edit script - the algorithm behind git diff, from scratch. 7 tests incl. the reconstruction invariant.
  • Download: Delta (ZIP)
We build this for clientsFull-stack

Read the full write-up

More from the lab

Browse all entries

Want this looked at on your own system?Start a conversation

5.0
“New shop, more orders in the first week.”Müller Márk · GeekCornerManaging Director · Hungary