A console-based Contact Manager that stores and manages contacts using a Binary Search Tree (BST) for efficient searching by name.
This project demonstrates how data structures can be applied to real-world problems, focusing on insertion, searching, updating, and deletion of contacts.
- Add new contacts (name, phone, email, address)
- Search for a contact by name (efficient BST lookup)
- Update existing contact details
- Delete a contact
- Display all contacts in alphabetical order (in-order BST traversal)
- Input validation to ensure clean and structured data
- Language: Python 3
- Data Structure: Binary Search Tree (BST)
ContactManager/
│── contact_manager.py # Main program logic
│── README.md # Project documentation-
Each contact is stored as a node in the BST.
- Key: Contact Name (used for ordering)
- Value: Phone, Email, Address
-
Operations supported:
- Insert: Add a new contact into the BST.
- Search: Find contact details by name.
- Update: Modify an existing contact’s details.
- Delete: Remove a contact from the BST.
- Traverse: List all contacts alphabetically.
Make sure Python 3 is installed on your computer.
You can download it from: https://www.python.org/downloads/
Check installation:
python --versiongit clone https://github.com/your-username/contact-manager-bst.git
cd contact-manager-bstpython contact_manager.pyFollow the console menu to:
- Add a contact
- Search a contact
- Update a contact
- Delete a contact
- Display all contacts
- Exit the program
===== Contact Manager =====
1. Add Contact
2. Search Contact
3. Update Contact
4. Delete Contact
5. Display All Contacts
6. Exit
Enter choice: 1
Enter name: John Doe
Enter phone: 123456789
Enter email: john@example.com
Enter address: 123 Main St
Contact added successfully!- Save contacts to a file(persistent storage)
- Load contacts at startup
- GUI version(Tkinter or web-based)
- Balance BST using AVL Tree or Red-Black Tree for optimal efficiency
- Add contact groups and tags
This project helped reinforce:
- Implementation of BST operations
- Practical application of DSA concepts
- Error handling and input validation
- Designing a real-world mini-application
- Abraham K.C Blama(I'm thinking of nicknaming myself Round-Robin)
- Wanna see more of my projects come here: KCblama19
- Contact me at: Roubin-Robin-Mail
For context: Round-Robin(scheduling algorithm) is one of the fairest algorithm in computer science, it balances every tasks in the CPU so that each task gets a turn to be executed and I like to live that way too: balanced, fair, and making sure no one in my cycle gets left out, but, with a twist, I don't let anyone hog my time, lol, so basically, I would check-in, keep things moving and move to the next person.