Question: Design and implement an ordered or non-ordered dynamic linked list using C++ classes including the following methods: o isEmpty ( ) - returns an integer

Design and implement an ordered or non-ordered dynamic linked list using C++ classes including the following methods:

o isEmpty ( ) - returns an integer or bool type; true for an empty list, false for non-empty list

o insertAtFront ( ) allocates a node dynamically; initializes it to the data passed in; inserts the node at the front of the list only; returns true or false for successful or unsuccessful insertion, respectively

o insertAtEnd ( ) - allocates a node dynamically; initializes it to the data passed in; inserts the node at the tail or end of the list only; returns true or false for successful or unsuccessful insertion, respectively

o insertInOrder ( ) - allocates a node dynamically; initializes it to the data passed in; inserts the node in the list in ascending or descending order only; returns true or false for successful or unsuccessful insertion, respectively

o deleteNode ( ) de-allocates a node dynamically; returns true if node was de-allocated, false otherwise o printList ( ) prints out the data in each node of the list; may be printed iteratively or recursively

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!