Problem statement
Design the object model and core APIs for a personal contact manager that stores people, organises them into groups, and keeps the address book free of duplicates.
Operating context. A single user holds tens of thousands of contacts. A contact has a name plus any number of phone numbers, email addresses, and postal addresses, each labelled (home, work, other), and optional notes and tags. Contacts belong to zero or more groups (Family, Team, Gym). The user searches by name, phone, or email and expects instant results. Imported contacts frequently duplicate existing ones, so the system must detect likely duplicates and merge two contacts into one without losing data. All in-process, on one device.
Out of scope. Server sync and the import file-format parsers (vCard / CSV), the UI, phone / email verification and messaging, data-export tooling, and photo / avatar blob storage — model the in-memory domain and its query surface.
What to produce. The class hierarchy (Contact, the multi-valued field types, Group, the search index, a duplicate detector and a merge service), the public API each exposes, and how a contact is built and merged. Be explicit about: how multi-valued labelled fields are modelled cleanly, how the search index answers name / phone / email lookups fast and stays consistent on edits, and how the duplicate-match rule is pluggable so its strictness can change without touching Contact.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design LLD
- Oop Solid
- Data Indexing
- Patterns Strategy
- Patterns Builder