Minimum Time Traversal Question in Recursion Set

I couldn’t understand the example given, as for instance

3

20 20 100 100

35 35 50 50 0

30 30 25 25 0

40 40 60 60 100

the answer should be (35-20)*2 + (100-50) *2 =130, but the answer is 120.

please elaborate this

hello @Rhinorox
from 20 20 to 25 25 -> time 10
then 25 25 to 30 30 -> time 0
then 30 30 to 35 35 -> time 10
then 35 35 to 50 50 -> time 0
then 50 50 to 100 100 -> time 100

total time=10+0+10+100 =>120

1 Like