Company: Tally_14march
Difficulty: medium
Nature Walk Problem Description You are walking down a nature trail while going for a picnic. You see various plants that require water for survival. It is already hot, and you feel the need to water the plants, but you are bound by some "Nature's Laws" which state that you may only water a plant from a container if you have enough water to water it or you will have to go to the river and fetch water from there again. The location of plants is given as an array (0-based indexed), and the array elements denote the amount of water a plant requires. The river is at -1, index position. You have to calculate the number of steps required to water all the plants. Note: You start from the river i.e., the index position -1. Input Format An integer, N denoting the size of the array and the number of plants, The following N lines are the array elements representing the watering capacity of each plant. The last line is the capacity of the container to be used: K . Constraints N : the size of the a