Pergunta de entrevista da empresa Lightspeed

Easy Coding challenge and a system design question.