Based on real 1-hour coding interviews at fintech/payment companies like Ziina, Stripe, Square, etc.
Problem 1: Payment Rate Limiter - rate_limiter.py
- Prevent payment fraud/abuse - 15-20 minutes
Problem 2: Circuit Breaker - circuit_breaker.py
- Protect against external service failures - 15-20 minutes
Problem 3: Money Handler - money_handler.py
- Precise decimal arithmetic for payments - 15-20 minutes
Problem 4: API Client with Retries - api_client.py
- Reliable external API integration - 20-25 minutes
Problem 5: Event Sourcing - event_sourcing.py
- Transaction audit trail and state reconstruction - 25-30 minutes
Problem 6: Saga Pattern - saga_pattern.py
- Distributed transaction coordination with rollback - 25-30 minutes
Problem 7: Transaction Cache - transaction_cache.py
- Cache recent transactions with expiry - 15-20 minutes
Problem 8: Payment Queue - payment_queue.py
- Process payments with priorities - 20-25 minutes
Problem 9: Webhook Delivery System - webhook_delivery.py
- Reliable delivery with retries - 20-25 minutes
Problem 10: Duplicate Detector - duplicate_detector.py
- Prevent duplicate transactions in real-time - 20-25 minutes
Problem 11: Idempotency Handler - idempotency_handler.py
- Prevent duplicate payment processing - 15-20 minutes
- 5 min: Problem clarification
- 35 min: Core implementation (pair programming)
- 15 min: Edge cases & optimization
- 5 min: Discussion & questions
- Clean code while thinking out loud
- Edge case handling (timeouts, failures)
- Simple solutions that work
- Good collaboration during pairing
- Testing mindset (how would you test this?)
Each problem includes:
- ✅ Real-world business context
- ✅ Starter code structure
- ✅ Test cases to guide you
- ✅ Common follow-up questions
- ✅ Expected time to complete