PermMissingElem Codility JAVA solution (100/100)

Since the numbers in array are starting from 1 we can get the sum of all elements in array and subtract it from expected sum of elements if there wasn’t missing any. That should give us the element missing.