This question evaluates a candidate's ability to design a scalable expense policy/rules engine for a corporate card system, testing skills in rule representation, API response modeling, conflict resolution, auditing/explanations, and performance and scalability considerations.
You are building an expense policy engine for a corporate credit-card system. Managers define policies (rules) that must be evaluated against expense transactions. Each expense is represented as a dictionary/map with string keys and string values.
Design and describe an implementation for:
The system must flag violating expenses.
Login required