Tap here to switch tabs
Problem
Submissions

Problem: Missing Number In Arithmetic Progression

med
30 min
Try to solve the Missing Number In Arithmetic Progression problem.

Statement

An integer array arr was originally an arithmetic progression of numbers, but exactly one integer was removed. The first and last elements of the original progression were never removed.

Return the missing integer.

Constraints:

  • 3≤3 \leq arr.length ≤1000\leq 1000

  • 0≤0 \leq arr[i] ≤105\leq 10^5

  • The given array is guaranteed to be a valid array.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Missing Number In Arithmetic Progression

med
30 min
Try to solve the Missing Number In Arithmetic Progression problem.

Statement

An integer array arr was originally an arithmetic progression of numbers, but exactly one integer was removed. The first and last elements of the original progression were never removed.

Return the missing integer.

Constraints:

  • 3≤3 \leq arr.length ≤1000\leq 1000

  • 0≤0 \leq arr[i] ≤105\leq 10^5

  • The given array is guaranteed to be a valid array.