Professional Documents
Culture Documents
Singly Linked List Dictionary: Regarding Insert
Singly Linked List Dictionary: Regarding Insert
The job involves implementing a dictionary as a C++ class, using a singly linked list as the
internal structure. The public interface will be provided below.
No containers from the C++ standard libraries should be used, implementation should be
done with a purpose made singly linked list using pointers and explicit recursion.
The linked list should consist of a finite sequence of nodes, where each node stores a key,
an item, and a pointer to the next node in the sequence. Initially, the type of both keys and
items in this dictionary should be std::string.
Regarding insert
-
If the key is already present in the dictionary, then the associated item should be
overwritten by the item being inserted.
Regarding lookup
-
If the key is not present in the dictionary, then a null pointer should be returned.
Regarding remove
-
If the key is not present in the dictionary, then the dictionary should not be
modified.
Ideally
-
Must be original code written from scratch, no use of standard C++ library.
Budget - $120
Initial Implementation - $70
Full Implementation (Inc. No memory leaks, deep copy, efficient move operations, simple
documentation) - $50