Available question text
Given an integer array, find the minimum number of ±1 moves needed to make all elements equal — equivalently, choose a target value that minimizes the sum of absolute deviations. This is an L1-minimization problem whose optimal target is any median, so the answer is the sum of |nums[i] − median|.
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
PayPal
Leetcode 462. Minimum Moves to Equal Array Elements II
Reported Jan 5, 2026 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source