You are given two integers, n and k. There are n uniquely sized sticks with lengths ranging from n. You need to arrange these sticks in a single line such that looking from the left, exactly k sticks are visible. A stick is visible from the left if there are no sticks to its left that have a greater length.
Return the total number of permutations of the sticks such that exactly k sticks are visible from the left. Since the answer can be large, return it modulo
Constraints:
n
k n
You are given two integers, n and k. There are n uniquely sized sticks with lengths ranging from n. You need to arrange these sticks in a single line such that looking from the left, exactly k sticks are visible. A stick is visible from the left if there are no sticks to its left that have a greater length.
Return the total number of permutations of the sticks such that exactly k sticks are visible from the left. Since the answer can be large, return it modulo
Constraints:
n
k n