MediumAbout 12 minSet operations
Diff two snapshots into added / removed / changed
Given two snapshots old and new (each a dict mapping key -> value), compute the change set. Return a dict with three sorted lists of keys: - "added" — keys in new but not old - "removed" — keys in old but not new - "changed" — keys in both whose value differs
Unchanged keys appear in none of the lists. Each list must be sorted ascending.
What the tests check
6 on Run · 7 on Submit01empty inputs
02detects added keys
03detects removed keys
04detects changed values only
05unchanged keys appear nowhere
06added and removed keys are not also reported as changed
Submit runs these and one more check you don’t see, so code written for the visible tests alone can still miss.
Runtime
Python 3.13 in your browser – the standard library plus pandas and numpy; no pip installs.