Daily challenge for 2026-04-28
483. Identify the Peak Altitude
You are given a sorted array of integers representing altitudes measured at fixed intervals along a mountain trail. The trail starts at a low elevation, increases steadily to a single peak, and then decreases. However, you are only given the first half of this data: a strictly increasing sequence of integers. Your task is to find the index of the first altitude that is greater than or equal to a specific target value using a binary search approach. If no such altitude exists, return the length of the array.
Example:Input: altitudes = [1200, 1500, 1800, 2100, 2500], target = 1900Output: 3
Run this challenge interactively in Python or JavaScript when the app loads.