Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 317 Bytes

Getting_Diff_Number.md

File metadata and controls

5 lines (3 loc) · 317 Bytes

#Getting a Different Number

Given an array arr of n unique non-negative integers, how can you most efficiently find a non-negative integer that is not in the array?

Your solution should return such an integer or null if arr contains all possible integers. Analyze the runtime and space complexity of your solution.