Pergunta de entrevista da empresa Lightbits Labs

fix a code and some memory question.