FB E5 phone interview
Hi all, my first ever faang interview and i got 2 problems Check if the array of length N is a permutation of N example: [0,1,3,4,2] -> True ; [0,1,2,5] -> False; [0,3,3] -> False; [-1,-2,0,1] -> False I have solved it using adding numbers from array to set and checking if numbers in range of N are in set, if not return False else True. Was asked if we can improve on a space complexity, suggeste..
더보기