Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started