comefrom: <awangdev>621. Task Scheduler_2.java
code: public int leastInterval(char[] tasks, int n) {
          if (tasks == null) return 0;
  
          int[] count = new int[26];
          for (char c : tasks) count[c - 'A']++;
          Arrays.sort(count); 
  
          int max = count[25], i = 25;
          while (i >= 0 && count[i] == max) i--;
          int countRepeatedTopTask = 25 - i;
  
          return Math.max(tasks.length, (max - 1) * (n + 1) + countRepeatedTopTask);
      }
masked: public int sample_funcname ( char [ ] var_0 , int var_1 ) {
    if ( var_0 == null ) return 0 ;
    int [ ] var_2 = new int [ 26 ] ;
    for ( char var_3 : var_0 ) var_2 [ var_3 - 'A' ] ++ ;
    Arrays . sort ( var_2 ) ;
    int max = var_2 [ 25 ] , var_4 = 25 ;
    while ( var_4 >= 0 && var_2 [ var_4 ] == max ) var_4 -- ;
    int var_5 = 25 - var_4 ;
    return Math . max ( var_0 . length , ( max - 1 ) * ( var_1 + 1 ) + var_5 ) ;
  }
  