stores the frequency of all single digit in three - digit number
$ freq [ 10 ] = array ( 0 ) ; $ freq [ $ dup % 10 ] ++ ; $ dup = $ dup / 10 ; $ freq [ $ dup % 10 ] ++ ; $ dup = $ dup / 10 ; $ freq [ $ dup % 10 ] ++ ; $ dup = $ i ;