leetle

Daily challenge for 2026-05-14

499. Find the Missing Sequence Value

You are given a sorted array of distinct integers arr that represents an arithmetic sequence where exactly one element is missing. The sequence originally had a constant difference between consecutive elements. Find the missing element using binary search.

Example:
Input: arr = [2, 4, 8, 10, 12, 14]
Output: 6
Explanation: The constant difference is 2. The missing element is 6.

Run this challenge interactively in Python or JavaScript when the app loads.