Available question text
Given nums1 and nums2, you may swap any two indices in nums1 at cost equal to the sum of their indices; find the minimum total cost to make nums1[i] != nums2[i] for every i (or return -1 if impossible). The core challenge is a weighted swap-optimization under frequency constraints—choosing which indices (including non-conflicting ones) to use in swaps to resolve equalities while minimizing the total index-sum cost.
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 2499. Minimum Total Cost to Make Arrays Unequal
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source