Map each workload to the right execution model
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
Interview Prompt
Map each workload to the right execution model. Rule: I/O-bound and many small waits -> 'async'; CPU-bound single-machine -> 'multiprocessing'; CPU-bound that exceeds one machine -> 'spark'. Given workloads {'api_calls':'io','image_resize':'cpu_single','petabyte_join':'cpu_cluster'}, produce a dict mapping each workload to its model and print it with keys sorted. (Model the decision, no asyncio.)
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision