Frage im Vorstellungsgespräch bei Meta

Two coding tasks: first one about strings, second one about binary tree