A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L3
Problem
Given old_records and new_records (each a list of dicts with an 'id' key), return a dict with three sorted lists of ids: 'added' (in new but not old), 'removed' (in old but not new), 'modified' (in both, where any non-id field differs between the matched records). Sort each id list ascending.
Summary
Before and after snapshots. The delta is in there.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.