mark
mapping stone positions to their indices.prevJump - 1
, prevJump
, prevJump + 1
):
a. Calculate the next position of the frog.
b. Check if the next position has a stone and if the jump size is positive.
c. If so, recursively call the function with the new index and jump size.