Frage im Vorstellungsgespräch bei Mercury Insurance Company

It was a continued coding question for two problems