Back to exercises

Missing Number

Compute the expected sum from 0 through n and subtract the actual sum of the list to find the missing number.

Coding Exercises Easy O(n)

Missing Number

Compute the expected sum from 0 through n and subtract the actual sum of the list to find the missing number.

Given numbers from 0 to n with one missing, return the missing value.