Parinaz is trapped inside the building elevator due to karma, which can only go from the ground floor (0) to the B floor.
It has two buttons up and down. He wants to go u floor up and d floor down
A is located and needs to reach the level of B as quickly as possible. Using the dynamic programming method, write a program that has the lowest number.
Press the appropriate button to level B and if possible, go to floor B by the elevator. Message him to get to work.
think badly Also, you can get the optimal path in your algorithm and print it in the output