Xero Interview Question

Some standard algorithms were asked