• + 0 comments

    public static void countApplesAndOranges(int s, int t, int a, int b, List apples, List oranges) { // Write your code here int nbrapples , nbroranges ; nbrapples = apples.stream().map( d -> a + d ) .filter(d ->( d >= s && d <= t)).collect(toList()).size(); nbroranges = oranges.stream().map( d -> b + d ) .filter(d ->( d >= s && d <= t)).collect(toList()).size();

        System.out.println(nbrapples);
        System.out.println(nbroranges);
    }