You are viewing a single comment's thread. Return to all comments →
Nice... The Java 8 is not bad too :) a bit longer, but easy to understand.
Arrays.stream(apple) .filter(x -> x + a >= s && x + a <= t) .count(); Arrays.stream(orange) .filter(x -> x + b >= s && x + b <= t) .count();
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →
Nice... The Java 8 is not bad too :) a bit longer, but easy to understand.