Amadeus interview question

Write a recursive string parser (in the online test).