Question: use any programming language Spiderman's webs: As everyone knowns spiderman shoots his web to climb onto buildings. Assume He shoots minimum of 1 web to
use any programming language
Spiderman's webs: As everyone knowns spiderman shoots his web to climb onto buildings. Assume He shoots minimum of 1 web to move from one building to another consecutive building of same height or lower height, and he throws one more than the previous webs if the building's height is more than the previous building. Considering this scenario in the mathematical way, buildings' heights are given as input and your need to print the minimum number of webs required to reach the last building. Initially consider he is starting from the adjacent building which is of the same height as the initial building.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
