Available question text
Choose any start index and, using at most maxChanges zero→one flips (each counting as a move) and adjacent swaps of 1s toward your position (each swap counts as a move; picking a 1 at your index is free), collect exactly k ones with minimum moves. Algorithmically this is about selecting k target positions (possibly turning some zeros into ones) and minimizing the total adjacent-swap distance to aggregate them at some center under a flip budget, typically handled by working on the positions-of-ones with sliding-window/prefix-cost techniques.
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 3086. Minimum Moves to Pick K Ones
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source