Drivemode Interview Question

They asked me to process an API request provided by Hackerrank problem and properly aggregate the results to output the desired information.