DifferenceKit icon indicating copy to clipboard operation
DifferenceKit copied to clipboard

The algorithm cannot get the best diff results?

Open starFelix opened this issue 3 years ago • 1 comments

If I have two arrays like below:

A: [a, b, c]
B: [b, c, a]

the diff result will be:

[
(source:1, target:0),
(source:2,target:1)
]

In fact, we just need 1 move:

(source:0, target 2)

Is this algorithm not able to get best diff results?

starFelix avatar Oct 26 '22 14:10 starFelix

And will more moving steps cause the animation to freeze?

starFelix avatar Oct 26 '22 15:10 starFelix