Company: Flipkart_13july
Difficulty: medium
River Log Jumps Problem Description Geeta wants to cross a river which does not have a bridge across it. She found some logs floating on the water and decides to cross the river by jumping from one log to the other. All the logs are arranged linearly and are of varying lengths, some very slippery and someone had tied them together at the left end to hold them parallel to each other. Only the right end of the logs are free to move. Geeta can jump from the right end of one log by jumping from the right end of one log to the next. However all the logs were of different lengths so which meant in each jump she had to also go a certain distance left or right. Geeta knew she could only jump a fixed distance to her right and to her left. So if the logs were more apart than that, she would have to turn back and reach her starting position. But if she could jump, it was always from the bank, but if left with no no choice she would return back to her starting position. Write a program to print th