Available question text
Given an integer array (n up to 1e5), you may change up to three elements to any value; return the minimum possible difference between the largest and smallest values after at most three moves. Key observation: after sorting, only four scenarios matter — remove k smallest and 3−k largest (k=0…3) — and take the minimal remaining range.
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 1509. Minimum Difference Between Largest and Smallest Value in Three Moves
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source