will be used for the last position
index = index + 1 ; findend ( i , j , a , output , index ) ; } } } cout << " [ " ; int aa = 2 , bb = 0 ; for ( auto i : output ) { bb = 3 ; cout << " [ " ; for ( int j : i ) { if ( bb ) cout << j << " , ▁ " ; else cout << j ; bb -- ; } cout << " ] " ; if ( aa ) cout << " , ▁ " ; aa -- ; } cout << " ] " ; }