Function to print all possible shortest sequences starting from start to target .
void displaypath ( vector < vector < string > > & res ) { for ( int i = 0 ; i < res . size ( ) ; i ++ ) { cout << " [ ▁ " ; for ( int j = 0 ; j < res [ 0 ] . size ( ) ; j ++ ) { cout << res [ i ] [ j ] << " , ▁ " ; } cout << " ▁ ] STRNEWLINE " ; } }