DEV Community

loading...

Discussion on: Daily Challenge #306 - Largest Possible Product

Collapse
baenencalin profile image
Calin Baenen

What counts as adjacent? Neighboring?
Like the tests, I'm gonna assume that this only takes 3 inputs.
But, Java:

class Utils {
    public static Number adjacent_product(float x, float y, float z) {
        return y*Math.max(x, z);
    }
}
Enter fullscreen mode Exit fullscreen mode