Function to find the count of subarray with all digits unique
static int largestSubset ( int [ ] a , int n ) { for ( int i = 0 ; i < 5000 ; i ++ ) { for ( int j = 0 ; j < 1029 ; j ++ ) dp [ i , j ] = - 1 ; } return calculate ( 0 , 0 , a , n ) ; }