Match payments to invoices with fallback rules | TikTok Interview Question