text: Here we can replace 2 with 0 and 1 anytime
code: if ( s [ i ] === " " && count [ 2 ] > reqd ) { if ( count [ 0 ] < reqd ) { s [ i ] = " " ; count [ 0 ] ++ ; count [ 2 ] -- ; } else if ( count [ 1 ] < reqd ) { s [ i ] = " " ; count [ 1 ] ++ ; count [ 2 ] -- ; } }