Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3357. Minimize the Maximum Adjacent Element Difference
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.