I have 2 arrays that change once in a while. I want to compare them and get the additions & deletions between the first, source array and the second array.
Additions/deletions can occur at the middle of the array (not necessarily at the edges).
For example, from these arrays:
Array 1
Item A | Item B | Item C | Item D | Item E
Array 2
Item A | Item Z | Item C | Item D | Item E
I would like to get the following output: - Item B was removed - Item Z was added
What is the best way to deal with this issue?