Path vector to store the current path
List < Integer > path = new ArrayList < > ( ) ; path . add ( src ) ; queue . offer ( path ) ; while ( ! queue . isEmpty ( ) ) { path = queue . poll ( ) ; int last = path . get ( path . size ( ) - 1 ) ;