Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1217. Minimum Cost to Move Chips to The Same Position
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).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.