Frage im Vorstellungsgespräch bei Databricks

Object oriented design question involving a montonically increasing stack