BrexSoftware Engineer · OnsiteCodemia practiceAuthorize Card Swipes Against Nested Budget Limits With Holds
Implement a spend ledger where budgets form a tree, each card draws from one budget, and an authorization is approved only if the amount fits under the remaining limit of that budget and every ancestor. Support settling a hold at a different final amount, reversing a hold, and idempotent retries of the same authorization id.
Medium
Coding & Algorithms