You are viewing a single comment's thread. Return to all comments →
This is java solution using stream api
long app=apples.stream().filter(n-> (a+n>=s && a+n<=t) ).count(); long org=oranges.stream().filter(n-> (b+n>=s && b+n<=t) ).count(); System.out.println(app); System.out.println(org);
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 →
This is java solution using stream api