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 ++ ) Arrays . fill ( dp [ i ] , - 1 ) ; return calculate ( 0 , 0 , a , n ) ; }