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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started