stairs problem with more constraints
Anonymous User
395

Given A stairs and you are standing at the 0th stair.
In a single step you can climb

  • 1 stair
  • 2 stairs
  • 3 stairs

But there's a constraint, you can climb 3 stairs in a single step atmost B times.
Return the number of ways of climbing given A and B.

Comments (2)