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 | SoloLearn: Learn to code for FREE!

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.

12/7/2017 3:21:26 PM

alok rana

1 Answer

New 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.