First, process all the delete instructions, starting at the end. Then, process all the insert instructions, starting at the beginning.
I tested that by hand and it came out properly.
In reply to Re: Re: Yet another Algorithm::Diff question
by chipmunk
in thread Yet another Algorithm::Diff question
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |