Leetcode 2612. Minimum Reverse Operations
Given an array of length n with a single 1 at p and some banned positions, compute for each index the minimum number of fixed-size (k) subarray reversals needed to move the 1 there (or -1 if impossible). This reduces to finding shortest paths in an implicit graph of indices (edges = positions reachable by one valid k-length reversal) under the constraint n ≤ 1e5, requiring BFS-style exploration with efficient range management.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.