package leetcode;

/**
 * https://leetcode.com/problems/longest-well-performing-interval/
 */
public class Problem1124 {
    public int longestWPI(int[] hours) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1124 prob = new Problem1124();
        System.out.println(prob.longestWPI(new int[]{9,9,6,0,6,6,9})); // 3
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/longest-well-performing-interval/
 */
public class Problem1124 {
    public int longestWPI(int[] hours) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1124 prob = new Problem1124();
        System.out.println(prob.longestWPI(new int[]{9,9,6,0,6,6,9})); // 3
        System.out.println(prob.longestWPI(new int[]{8,6,9,9,10,9,0,6,6,9})); // 9
    }
}

Update problem 1124