Guest User

Untitled

a guest
Nov 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. function solution(A) {
  2. // write your code in JavaScript (Node.js 8.9.4)
  3. const Aset = new Set(A)
  4. for(let i =1; i<=A.length+1; i++){
  5. if(!Aset.has(i)) return i;
  6. }
  7. }
Add Comment
Please, Sign In to add comment