Easy10 min
Find the Missing Number
An array contains distinct numbers from 0 through n with one number missing. Return that number.
Your function
Implement solve(value, extra) in JavaScript. Return the answer; printing alone does not count as a result.
Examples
Input:
[[0,1,3]]Output:
2Input:
[[1]]Output:
0Constraints
Input contains at most 1,000 values or characters. Numbers are finite integers. Inputs follow the structure shown in the examples.