if required node ' x ' is present then print the path
if ( hasPath ( root , arr , x ) ) { for ( int i = 0 ; i < arr . Count - 1 ; i ++ ) Console . Write ( arr [ i ] + " - > " ) ; Console . Write ( arr [ arr . Count - 1 ] ) ; }