- clone the project
- run
npm install
in your terminal to install the "prompt" package - run
node index.js
to start
- Using a linkedList as the data structure to save "key" and "value":
- Linked List is Dynamic data Structure.
- Linked List can grow and shrink during run time.
- Insertion and Deletion Operations are Easier.
- Efficient Memory Utilization, no need to pre-allocate memory.
- Faster Access time,can be expanded in constant time without memory overhead.
- create a "LinkedListNode" model with attribute key, value and next(as shown in linkedListNode.js file);
- create a "LinkedList" model with a constructor to initial a empty linkedList(as shown in linkedList.js file);
- define three functions: add, get and remove to meet requirements (as shown in linkedList.js file);
- create the start CLI interface (index.js file) with a menu that users can select to start and a loop to keep testing.