How would you solve a general aptitude problem at an average difficulty level?
For this coding exercise, implement find_missing(nums) to identify the one missing integer from the range 0 through n, where n is the length of the array. The input is an array of distinct integers, and the output is the missing integer.
Example 1: nums = [3, 0, 1] returns 2 because the range is 0 through 3.
Example 2: nums = [0, 1] returns 2.
Constraints: 1 <= nums.length <= 1000; values are distinct and each is between 0 and n.
def find_missing(nums):