Lightspeed interview question

Easy Coding challenge and a system design question.