LeetCode 268: Missing Number
Problem Restatement We are given an array nums containing n distinct numbers from the range: 0, 1, 2, ..., n Exactly one number from this range is missing. Return the missing number. For example, if: nums = [3, 0, 1] then n = 3 , so the full range should be: [0, 1, 2, 3] The missing number is: 2 The problem asks for an algorithm with linear runtime. The...