We put the details of component in final output array
a . add ( j ) ; b . add ( w ) ; c . add ( ans ) ; } System . out . println ( a . size ( ) ) ; for ( int j = 0 ; j < a . size ( ) ; ++ j ) System . out . println ( a . get ( j ) + " ▁ " + b . get ( j ) + " ▁ " + c . get ( j ) ) ; }