Finally pop all Nodes from Stack and prints them .
Vector < Integer > v = s . peek ( ) ; s . pop ( ) ; for ( int i = 0 , j = v . size ( ) - 1 ; i < j ; ++ i ) { System . out . print ( v . get ( i ) + " ▁ " + v . get ( j ) + " ▁ " ) ; j -- ; } }