Can it be solved using unbounded knapsack(coin change) how?


#1

Can Anybody help me understand the context.


#2

Consider the Stairs as a bag of coins that you are filling with a 1 or 2 rupee coin.
Now here you have to answer the different ways you can enter coin in the bag more specifically the order in which you are inserting the coins.


#3

Rather than thinking this as an unbounded knapsack, think it as fibonacci. As, in unbounded knapsack if u reject 2 form array of {1,2} you wont be able to select 2 again. try writing outputs for A=4 and then check what u will get from unbounded knapsack, then u will know it’s fibonacci and not unbounded knapsack