Goldman Sachs·Software Engineer·Technical Phone Screen
- You're extending a fraud rules engine to support a sliding 60-minute window velocity check. Reject any transaction where the user's approved transaction total over the past hour plus the new transaction amount would exceed $5000. Walk through your data structure choice and the time complexity per check.
“I went with a per-user deque of (timestamp, amount) pairs.”