Frage im Vorstellungsgespräch bei New York Times

A simple coding exercise, sub-easy Leetcode difficulty