Ernest interview question

Show your thought process