Accenture interview question

How would you code?