Myers Diff for Tab Management: Part 2
deontevanterpool.com·6h·
Discuss: Hacker News
Flag this post

2024-09-16

In Part 1 of this article, I discussed why I was using Myers diffing algorithm for an project I’m working on. The project is to create a chrome extension tab manager based on Git version control and UNIX commands. Now, I will be breaking down the algorithm to make it easy to understand.

The original paper was written by Eugene W. Myers. It can be found here

Introduction

Before we get into the algorithm, let me re-introduce the problem quickly. Skip ahead if you’ve read part 1.

Imagine I have two strings of text A and B. We can pick random strings to assign these variables for the sake of illustration:

A = “CAT” B = “BAT”

The “shortest edit script” is the minimum number of ins…

Similar Posts

Loading similar posts...