Frage im Vorstellungsgespräch bei JPMorganChase

Typicall SD question and as standard coding problem.