Easy Algo Task

Job ID: 31608420

Budget: $10 – $30 USD

Create contact management system. The system should have following
functions. Create new contact ‘n’ – you need to input the name, birthdate and phone
number and store it in any data structure. Find a contact by instruction ‘f’ – print
searched contact and put into list to show the history of search, each item in the list
should be unique, so duplicate values are not allowed (keep only the oldest value).
Sort ‘s’ – use any sorting algorithm to do ascending sorting by name and print out all
values inside, use any O(n
log(n)) algorithm. And see the history ‘h’ of all searches made by user.
Details:
 n -> new contact – takes contact name, birthdate(YYYYMMDD) and phone
number, check for no duplicate value.
 f -> find contact – takes searching name as parameter and put the searched
contact into list, check for no duplicate value in the list.
 s -> sort – O(n log(n)) sorting algorithm must be used. Should print ‘is empty’ if the database is empty.

 h -> history list – print out the list of searched contacts from oldest to newest
or print ‘is empty’ if list is empty.
 e -> Exit.