Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
- Minimum Number of Operations to Sort a Binary Tree by Level
Coding
- Minimum Pair Removal to Sort Array I
Coding
- Minimum Pair Removal to Sort Array II
Coding
- Minimum Replacements to Sort the Array
Coding · Array · Greedy · Math
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 3431. Minimum Unlocked Indices to Sort Nums
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source