The Algorithm Hiding Behind git diff

You've run git diff hundreds of times.

Red lines. Green lines. Done.

But have you ever stopped and asked — what algorithm is actually doing that?

It turns out, it's one of the most classic problems in computer science: Longest Common Subsequence. And it's been hiding inside your terminal every single day.