You are given a stones sorted in strictly increasing order, representing the positions of stones in a river.
A frog starts at the first stone, travels to the last stone, and then returns to the first stone. The frog can visit each intermediate stone at most once across the entire round trip.
The length of a jump between stones[i] and stones[j] is equal to stones[i] stones[j]
Return the minimum possible cost of a valid round trip path.
Constraints:
stones.length
stones[i]
stones[0]
stones is sorted in a strictly increasing order.
You are given a stones sorted in strictly increasing order, representing the positions of stones in a river.
A frog starts at the first stone, travels to the last stone, and then returns to the first stone. The frog can visit each intermediate stone at most once across the entire round trip.
The length of a jump between stones[i] and stones[j] is equal to stones[i] stones[j]
Return the minimum possible cost of a valid round trip path.
Constraints:
stones.length
stones[i]
stones[0]
stones is sorted in a strictly increasing order.