4 ) Concatenate all buckets into arr [ ]
int index = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < buckets [ i ] . size ( ) ; j ++ ) { arr [ index ++ ] = buckets [ i ] . get ( j ) ; } } }