Enforce a Rolling 24 Hour Zelle Sending Limit
Last updated: November 29, 2026
Quick Overview
Process a time-ordered stream of P2P send requests and approve each one only if the user's approved total over the trailing 24 hours, including this request, stays within a limit.
Bank of America
November 29, 20260
0
0 solved
Process a time-ordered stream of P2P send requests and approve each one only if the user's approved total over the trailing 24 hours, including this request, stays within a limit.
Framed around sending money with Zelle in the BofA app, where limits are rolling windows rather than calendar days. The interviewer checks the sliding window idea, the boundary at exactly 24 hours, and that declined requests do not consume limit.
What the Interviewer Expects
- Use a per-user queue of approved transfers with a running total
- Evict entries older than the window before deciding
- Only add approved transfers to the window
- Be explicit about the inclusive or exclusive boundary
- Give amortized O(1) per event
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How do you support both a daily and a 30-day limit at once?
- How would this work across many app servers?
- What if requests can arrive slightly out of order?
- How would you tell the user when they can send again?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Events are (user, timestamp in seconds, cents), sorted by timestamp. A request is approved if the sum of that user's approved amounts with timestamp in plus the new amount is at most ...
High-Level Design
Keep, per user, a deque of approved (timestamp, amount) and a running total. For each event, pop from the left while the oldest entry is at or before , subtracting it, then compare. This is...