S&P Global Interview Question

Java, AWS, APIs, Arrays, HashMap, Lambda features, Maths, Logical puzzle