Interview Query
Back to Data Engineering Interview
Data Engineering Interview

Data Engineering Interview

1 of 73 Completed

1m read
6m read
6m read
5m read
Question
Question
Question
Question
Question

Find the Missing Number
Go to question details page

You have an array of integers, nums of length n spanning 0 to n with one missing. Write a function missing_number that returns the missing number in the array.

Note: Complexity of O(n)O(n) required.

Example:

Input:

nums = [0,1,2,4,5] 
missing_number(nums) -> 3
Good job, keep it up!

1%

Completed

You have 72 sections remaining on this learning path.

Loading pricing options.