InterviewDB Experience

Hashmap Difference: Compute the Symmetric Difference Between Two Hashmaps

Interview Experience

Problem Given two hashmaps (dicts) A and B, compute their difference report: keys only in A, keys only in B, keys in both but with different values, and keys in both with identical values. Example: Follow-ups How do you handle nested dicts — would you diff recursively? What equality check do you use for values that may be lists or objects? How would you serialize the DiffReport as a human-readable patch format? How would you apply a DiffReport to transform dict A into dict B?

Full Details

🔒

Unlock all Nextdoor questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a candidate experience report from a nextdoor interview during the phone round.

It covers the following topics: Coding, Phone, Hash Table .