An ordered sequence of numbers from 1 to N is given. One number might have deleted from it, then the remaining numbers were mixed. Find the number that was deleted.
- The starting array sequence is
- The mixed array with one deleted number is
- Your function should return the int
If no number was deleted from the array and no difference with it, your function should return the int ``.
Note that N may be 1 or less (in the latter case, the first array will be
The solution in Java code
Test cases to validate our solution