export function missingNumber(nums: number[]) {

  let overallSum = 0;
  for (let i = 0; i <= nums.length; i++) {
    overallSum += i;
  }

  for (const num of nums) {
    overallSum -= num;
  }

  return overallSum;
};
