Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3424. Minimum Cost to Make Arrays Identical
Given two equal-length arrays, you can pay k to split arr into contiguous blocks and permute them (one such operation can realize any permutation) and/or pay |x| per unit to change individual elements; find the minimum total cost to make arr equal brr. The core challenge is trading a fixed-cost reordering (enabling an optimal value matching) against per-element adjustment costs, i.e., choose whether to keep positions or pay to permute and then minimize sum of absolute differences.
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.