Number of jumps for a thief to cross walls - GeeksforGeeks
A thief trying to escape from a jail. He has to cross N walls each with varying heights (every height is greater than 0). He climbs X feet every time. But, due to the slippery nature of those walls, every time he slips back by Y feet. Now the task is to calculate the total number of jumps required to cross all walls and escape from the jail.
Read full article from Number of jumps for a thief to cross walls - GeeksforGeeks
No comments:
Post a Comment