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.

7th Dec 2017, 3:21 PM
alok rana
alok rana - avatar
1 Resposta
+ 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.
8th Dec 2017, 4:58 PM
Hanz
Hanz - avatar