Given an integer array heights representing the heights of peaks in a mountain range, and two integers energyDrinks and climbingRopes, you are tasked with determining how far you can climb starting from the first peak (index 0).
You can move from peak i to peak i+1 by using one of the following options:
If the next peak is lower or equal to the current peak, no resources are needed.
If the next peak is higher, you can either:
Use energy drinks equal to the difference in heights (heights[i+1] - heights[i]).
Use one climbing rope to bypass the height difference.
The Task is to find the furthest peak (index 0-based) you can reach using the available climbing ropes and energy drinks optimally.