July 4th Sale
Limited Time Deal: Unlock all premium questions for over 40% off
$10.42$6.25
10
:
09
:
29
:
57
Back to Dashboard
Frog Distance
Medium
You are given an array blocks of N integers representing the heights of blocks arranged in a row, numbered from 0 to N - 1.
Two frogs start together on the same block. They then jump in opposite directions to maximize the distance between them. The distance between blocks at indices J and K (where J < K) is defined as K - J + 1.
...