Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Is the documentation correct for diff("abcd", "adbc")? #48

Open
znakeeye opened this issue Sep 27, 2019 · 1 comment
Open

Is the documentation correct for diff("abcd", "adbc")? #48

znakeeye opened this issue Sep 27, 2019 · 1 comment

Comments

@znakeeye
Copy link

In your list of examples, you have this piece of code:

let old = Array("abcd")
let new = Array("adbc")
let changes = diff(old: old, new: new)

// Move "d" from index 3 to index 1

Is this indeed correct or was this before introducing the Heckel algorithm?

Haven't verified this, but doesn't Heckel produce all three moves in this case? I.e.:

// Move "d" from index 3 to index 1
// Move "b" from index 1 to index 2
// Move "c" from index 2 to index 3
@github-actions
Copy link

Message that will be displayed on users' first issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant