
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
The maximum distance must be the distance between the first and last critical point.
For each adjacent critical point, calculate the difference and check if it is the minimum distance.