Pergunta de entrevista da empresa LexCheck

Was asked to solve two coding problems