3431: Minimum Unlocked Indices to Sort Nums

Problem Statement