PermMissingElem
PermMissingElem
See Detail : https://codility.com/demo/results/trainingCA8UPV-PD2/
Source Code : (Score is 0. Do not copy. It can't help you.)
See Detail : https://codility.com/demo/results/trainingCA8UPV-PD2/
Source Code : (Score is 0. Do not copy. It can't help you.)
// you can also use imports, for example:
// import java.util.*;
// you can write to stdout for debugging purposes, e.g.
// System.out.println("this is a debug message");
class Solution {
public int solution(int[] A) {
int calVal = 0;
int result = 0;
// write your code in Java SE 8
for(int i = 0 ; i < A.length ; i++){
calVal = A[0];
calVal += i;
if(A[i] != calVal){
result = calVal;
}
}
return result;
}
}