Match payments to invoices by memo or amount | Google Interview Question