Xero interview question

Challenges faced and code review