Google interview question

Systems design question and code review