Missing Sequence Number

Given an array containing n distinct integers taken from the range [0, n], find the one number that is missing from the range. The array has exactly n elements and one number from the range is absent.

Examples
Input: [3,0,1]
Output: 2
Hints
Related Problems

Missing Sequence Number

Given an array containing `n` distinct integers taken from the range `[0, n]`, find the one number that is missing from the range. The array has exactly `n` elements and one number from the range is absent.