Frage im Vorstellungsgespräch bei Google

Two technical phone interviews back to back, Leetcode medium