Problem Submissions Solution

Missing In Array

Difficulty: Easy

Acceptance: %

Points: 20.00

You are given an array arr[] of size n - 1, containing distinct integers ranging from 1 to n (inclusive), except one missing element. The task is to find and return the missing integer from the range.

Topics

Companies

Articles

Examples:

Expected Time Complexity O(N)

Expected Space Complexity O(1)

Constraints:
  • 1 <= arr.size() <= 10^6
  • 1 <= arr[i] <= arr.size() + 1
Companies:
Amazon Microsoft Visa Adobe TCS + 6 more
Topics:
Array Searching Algorithms
Locked Content
Access Restricted: Please Login to access the code editor and test cases.