Find digits of each element , then find length of subsequence for each digit and then find local maximum
for ( i = 1 ; i < n ; i ++ ) { tmp = arr [ i ] ; locMax = 1 ; memset ( cnt , 0 , sizeof ( cnt ) ) ;