Available question text
Return the k-th lexicographically-sorted permutation of 1..n whose adjacent elements alternate parity (no two consecutive odds or evens). With n up to 100 and k up to 1e15, the core challenge is to count valid permutations efficiently (DP/combinatorics) and use those counts to construct the k-th sequence without enumerating all permutations.
Related questions
Continue with questions that share topics or the same question type.
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 3470. Permutations IV
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source