0
WAF class Solution{public int solution(int[] A);}that given an array Aof N int,return smallest +ve int(<0)that doesnt occur in A
example Given A=[1,3,6,4,1,2] the function should return 5.
1 Answer
+ 1
Sorry, I don't know java and I haven't learnt class.
This is what I could do in c++:
https://code.sololearn.com/c6UW4EL7uD7m/#cpp
Not sure if this is what you want though.