Available question text
Find the minimum number of ±1 operations to make the array's median equal to k. After sorting, only elements on the median side that lie on the "wrong" side of k must be moved, so the answer is the sum of their distances to k.
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 3107. Minimum Operations to Make Median of Array Equal to K
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source