Frage im Vorstellungsgespräch bei ZipRecruiter

Leetcode easy, asked about optimization and time/mem complexity