If we hit this block , it means one path is completed . Add it to paths list and print
cout << " [ " << path [ 0 ] << " , ▁ " ; for ( int z = 1 ; z < path . size ( ) - 1 ; z ++ ) { cout << path [ z ] << " , ▁ " ; } cout << path [ path . size ( ) - 1 ] << " ] " << endl ; allPaths . push_back ( path ) ; return ; }