#268

Missing Number

easy · 71.7% accepted · 14,202 likes · top 81%

array · hash table · math · binary search · bit manipulation · sorting

⊣ practice⊣ quiz⊣ open on leetcode ↗

Description

Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.

Solution