Missing Numbers

Question (LC.268)

Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.

Example

I: [0, 1, 3] 
O: 2

Analysis

Last updated