The Hostile Takeover
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
- Seniority
- L4
Interview Prompt
Given two dicts base and override, recursively merge: if a key exists in both AND both values are dicts, recurse. Otherwise override's value replaces base's value. Keys only in base are kept; keys only in override are added. Do not mutate inputs.
Summary
One dict eats another.
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