Pergunta de entrevista da empresa Wise

Coding questions that were a bit hard.