you undirecte connect graph n node label 0 n 1 you give array graph graphi list node connect node edgeReturn length short path visit node you start stop node revisit node multiple time reuse edge Example 1input graph 123000output 4explanation one possible path 10203example 2input graph 1024134212output 4explanation one possible path 01423 Constraintsn graphlength1 n 120 graphilength ngraphi contain iif grapha contain b graphb contain aThe input graph connect