




Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can you keep track of the minimum height for each obstacle course length?
You can use binary search to find the longest previous obstacle course length that satisfies the conditions.