Fascinating post on how diff algorithms actually work: https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm-part-1/ (multiple possible implementations!)