Pergunta de entrevista da empresa Pocket Gems

2 coding questions and 1 code review.