You are viewing a single comment's thread. Return to all comments →
Java
public void computeDifference() { IntStream.range(0, elements.length).forEach(i -> { IntStream.range(i + 1, elements.length).forEach(j -> { if (Math.abs(elements[i] - elements[j]) > maximumDifference) { maximumDifference = Math.abs(elements[i] - elements[j]); } }); }); }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 14: Scope
You are viewing a single comment's thread. Return to all comments →
Java