Answer the question
In order to leave comments, you need to log in
How to find which element has been removed in an array?
It's a simple problem, but one I couldn't answer. There is an array of ints or bytes, we delete some element in it by forming a new array without this element. The arrays are unsorted. How, given these 2 arrays, to find out which element was removed? Naturally, without enumeration, the most effective / quick solution is needed.
The task is common, but if we take the context of the language, then we take java. Maybe there are some standard methods that I did not know about.
Answer the question
In order to leave comments, you need to log in
At the time of formation, remember the value or index of the deleted element
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question