counting freq of each element
let t = digit_prod ( i ) if ( mpp . has ( t ) ) { mpp . set ( t , mpp . get ( t ) + 1 ) } else { mpp . set ( t , 1 ) } } let ans = 1 ; let maxm = 0 ; for ( let x of mpp ) {