</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

03

:

12

:

39

Get this deal
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. ...