JPMorganChase Interview Question

LC Easy / Medium on the first OA