META Solutions interview question

Do the code test first