The interviewer said the question was the same as what's already on the forums — build an expense reimbursement system that can freely apply different approval rules to decide whether someone's submitted expense meets the requirements and can be paid out.
I also got to the second part of the question: after you've built a reimbursement approval system, can you further group reimbursements by some condition, and then decide whether that whole group can be reimbursed? For example, someone submits a reimbursement that includes things like meals, flights, and a rental car, but they're all part of the same business trip. That business trip becomes a group. If the rule is that the group can't exceed $2500 total, and it does, then the entire group can't be reimbursed.
The key points in the second part come down to a few things, but the main one is that a single reimbursement item can conflict with its group, and you have to handle that. For example, you submit a $20 meal that on its own meets the reimbursement conditions, but that meal is part of a business trip that spent $3000 total against a $2500 cap. So that meal can't be reimbursed. You need to clearly return which items can't be reimbursed because of the group limit, even though they'd be fine if submitted on their own.
Discussion
Loading comments…