LC 60
Permutation Sequence
Hard · LC 1–100
Candidate solution routes
Primary
FreePermutation backtracking
Invariant: At depth pos, path contains exactly pos distinct indices, used matches path exactly, and equal values at one level expand through only their canonical representative.
candidate confidence: 0.620 · metadata_only
How to use this page
Read the statement and constraints first, then validate recognition signals, invariant, and complexity. Candidate score is not correctness evidence.