<gouthampradhan>greedy_ReducingDishes_1.java
public int maxSatisfaction(int[] satisfaction) {
    Queue<Integer> pq = new PriorityQueue<>(((o1, o2) -> o2 - o1));
    Arrays.stream(satisfaction).forEach(pq::offer);
    int max = 0, sum = 0;
    while (!pq.isEmpty()) {
      if ((max + sum) >= max) {
        max += sum;
        sum += pq.poll();
      } else break;
    }
    return max;
  }
public int sample_funcname ( int [ ] var_0 ) {
  Queue < Integer > var_6 = new PriorityQueue < > ( ( ( var_3 , var_4 ) -> var_4 - var_3 ) ) ;
  Arrays . stream ( var_0 ) . forEach ( var_6 :: offer ) ;
  int var_12 = 0 , var_13 = 0 ;
  while ( ! var_6 . isEmpty ( ) ) {
    if ( ( var_12 + var_13 ) >= var_12 ) {
      var_12 += var_13 ;
      var_13 += var_6 . poll ( ) ;
    }
    else break ;
  }
  return var_12 ;
}
