Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Asap Question 2 (60 points): Implement a class called String Doubly Linked List (SDLI). This class should represent a doubly linked list structure where each

image text in transcribed
image text in transcribedAsap
image text in transcribed
Question 2 (60 points): Implement a class called String Doubly Linked List (SDLI). This class should represent a doubly linked list structure where each node stores a string value as its data. The linked list structure should be your own implementation so you cannot make use of the Standard Library Templates (STI) that is provided by C++. The class should have the following functionalitics: Function Prototype Description SDLLC) The default constructor. Creates an empty doubly linked list. The default destructor. Deletes all the nodes in a doubly linked list. bool isEmpty()const Returns tar if the list is empty, otherwise. void add ToHead(string element) Adds a new node to the head of the linked list. void addToTail(string element) Adds a new node to the tail of the linked list. Deletes the first node in the linked list. Returns the value of string deleteFromHead() the deleted node. string deleteFromTail() Deletes the last node in the linked list. Returns the value of the deleted node. void deleteNode(string element) Deletes the first node with a string value equals to the element. bool isInList(string val) const Returns if the list has a node with string equals to false void printAll() const Displays the contents of the linked list. void re licates() Deletes all the nodes in a linked list with duplicate string void reverse() Reverses the contents of the linked list. This function should not use a temporarylinked list to accomplish this task. int getSize() Returns the number of elements in the linked list. string& const int i) Returns the address of the data at the is node. Assume the

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago