Question: There are n uniquely - sized planks whose lengths are integers from 1 to n . You need to arrange the planks such that exactly
There are n uniquelysized planks whose lengths are integers from to n You need to arrange the planks such that exactly k planks are visible from the top. A plank is visible from the top if there are no longer planks to the top of it
For example, if the planks are arranged then the planks with lengths and are visible from the top.
Given n and k return the number of such arrangements. Since the answer may be large, return it modulo
Constraints:
n
kn
Test case :
Input: n k
Output:
Test case :
Input: n k
Output:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
