comefrom: <gouthampradhan>greedy_CourseScheduleIII_1.java
code: public int scheduleCourse(int[][] courses) {
      Arrays.sort(courses, (a, b) -> a[1] - b[1]);
      Queue<Integer> pq = new PriorityQueue<>((a, b) -> b - a);
      int time = 0;
      for (int[] course : courses) {
        time += course[0];
        pq.add(course[0]);
        if (time > course[1]) time -= pq.poll();
      }
      return pq.size();
    }
masked: public int sample_funcname ( int [ ] [ ] var_0 ) {
    Arrays . sort ( var_0 , ( var_1 , var_2 ) -> var_1 [ 1 ] - var_2 [ 1 ] ) ;
    Queue < Integer > var_3 = new PriorityQueue < > ( ( var_1 , var_2 ) -> var_2 - var_1 ) ;
    int var_4 = 0 ;
    for ( int [ ] var_5 : var_0 ) {
      var_4 += var_5 [ 0 ] ;
      var_3 . add ( var_5 [ 0 ] ) ;
      if ( var_4 > var_5 [ 1 ] ) var_4 -= var_3 . poll ( ) ;
    }
    return var_3 . size ( ) ;
  }
  