You have to make a Contacts application which supports the following two operations:
- Add contact
- Search Contact
- Contact list is case-sensitive i.e Alex and alex will be treated distinct.
- Python3.6
- For storing all contacts, I have used Trie data structure instead of normal Linear datastrucutre since it was mentioned in problem statement that the contact list can have many items . Time complexity for searching in case of Trie DS is O(m), where m is length of string to be searched, is very efficient as compared to any other linear DS like List of objects, etc.
- go to base directory after extracting the tar file.
- run:
python3.6 main.py
- select the approp. option from CLI.
- output will be printed on STDOUT.
- go to base directory after extracting the tar file.
- run:
python3.6 -m unittest test.py
- output of all test-cases will be printed on STDOUT.