Amazon Interview Question

Missing number in array from Leetcode