Frage im Vorstellungsgespräch bei Reddit

A basic leetcode-easy style question. Absolutely nothing difficult whatsoever.