The purpose of this assignment is to give you a little experience programming with pointers. You are allowed to use resources on the internet to try to do this assignment (pseudo-code shouldn’t be hard to find).
You will have a set of data (integers) and will implement three operations on this set:
• insert(e): insert element e into the set
• delete(e): delete element e from the set
• member(e): return a pointer to the node whose value field is e (otherwise return null)
• print( ): print the elements of the set
You will represent the set using the following data structures:
• sorted linked list - no sentinels.
• doubly-linked sorted list with sentinel nodes
• unsorted array
o member will return the index that elem is stored in (or -1 if it is not in the set)
Your program will behave as follows:
Please enter a command:
insert e
delete e
member e
quit
if user entered insert e: print the data structure after the insert is executed
if user entered delete e: print the data structure after the delete is executed
print an error message if e is not in the set
if user entered member e: print yes/no.
if user entered quit: the program terminates
Please enter a command: …
Note that every time the user enters a command you will execute that command on all three data structures (with the obvious exception of the quit command).