Pergunta de entrevista da empresa Statum

Coding challenge with theory in between