Increase totCount at exterior position
totCount [ index + k * n ] ++ ; } now = 0 ; totCount [ k * n ] -- ; for ( var j = 1 ; j <= n ; j ++ ) { if ( s [ j - 1 ] == ' ' ) now ++ ; var index = j - k * now ;