Pergunta de entrevista da empresa AMCS Group

first, my opinion about some code fragments. second, my way to cope with difficulties.