Cruise Interview Question

Array algorithm involving aggregation/reduction