Update distance for i
distance [ ( int ) edges [ x ] [ i ] ] = ( int ) distance [ x ] + 1 ; Q . Enqueue ( ( int ) edges [ x ] [ i ] ) ; visited [ ( int ) edges [ x ] [ i ] ] = true ; } } return ( int ) distance [ v ] ; }