EGYM Interview Question

Little coding (algorithm) challenge made on Google Document