Available question text
Chips can move by ±2 for free but ±1 costs 1, so the problem asks for the minimum cost to gather all chips at one position given parity-based moves. The optimal cost equals the smaller of the counts of chips on even vs odd positions (move the minority parity chips one step each).
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 1217. Minimum Cost to Move Chips to The Same Position
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source