Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3431. Minimum Unlocked Indices to Sort Nums
Given an array and a set of locked indices that cannot change, find the minimum number of indices you must unlock so that by permuting values on the unlocked positions the whole array can be sorted non-decreasingly. The core challenge is to determine which mismatches with the sorted array can be fixed using existing unlocked values (often via greedy/multiset matching) to minimize newly unlocked positions.
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.