Available question text
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.
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 3424. Minimum Cost to Make Arrays Identical
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source