WeWork interview question

Solve a problem in coding language of your choice and optimize