Given two integers n and k, return the n. If there are fewer than k valid alternating permutations, return an empty list [].
A permutation of the integers from n is considered alternating if the parity of adjacent elements alternates, meaning no two adjacent elements are both even or both odd.
Constraints:
n
k
Given two integers n and k, return the n. If there are fewer than k valid alternating permutations, return an empty list [].
A permutation of the integers from n is considered alternating if the parity of adjacent elements alternates, meaning no two adjacent elements are both even or both odd.
Constraints:
n
k