Wrong output for this test case


#1

A : 2
B : 20
C : 1
D : 18
E : 1
F : 5

For this test case the answer is 7
The expected output shows -1

Path is as follows
(1,18)
(2,16)
(1,14)
(2,12)
(1,10)
(2,8)
(0,7)
(1,5)


#2

Use 1 indexing instead of 0 it’ll work