Available question text
Given an array where missing entries are marked -1, choose exactly two positive integers x and y (each missing element replaced by either x or y) to minimize the maximum absolute difference between adjacent elements, and return that minimum possible maximum difference. Constraints: n up to 1e5 and values up to 1e9, so you must optimize over two global replacement values.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3357. Minimize the Maximum Adjacent Element Difference
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source