Program to find length of reduced string in a string made of three characters .
let DP = new Array ( MAX_LEN ) ; for ( let i = 0 ; i < DP . length ; i ++ ) { DP [ i ] = new Array ( MAX_LEN ) ; for ( let j = 0 ; j < DP [ i ] . length ; j ++ ) { DP [ i ] [ j ] = new Array ( MAX_LEN ) ; for ( let k = 0 ; k < MAX_LEN ; k ++ ) { DP [ i ] [ j ] [ k ] = 0 ; } } }