Question: Question 1: Using C++, write a DoublyLinkedList class that contains the following methods in addition to the class constructors void addFront(T item), adds an item

 Question 1: Using C++, write a DoublyLinkedList class that contains the

Question 1: Using C++, write a DoublyLinkedList class that contains the following methods in addition to the class constructors void addFront(T item), adds an item to the front of the list. e void addBack(T item), adds an item to the end of the list T deleteFront), deletes an item from the front of the list T deleteBack), deletes an item from the end of the list bool isSubset(T&Ist), returns true if Ist is a sublist of list and false otherwise. (hint: you may use a stack data structure to perform this check). Remember that you also need to create a Node class. You may use the code in the book to help write the classes. Test the class and make sure that all methods are working. Note that the isSubset methods worth more than the rest. Question 2: Write a C++ program that recognizes the binary strings, which belong to the following family: (012 i>0) based only on the stack data structure. The program takes as input a binary string specified by the user; it first determines if the string is valid or not (belongs to the family: (012 0) or not). It then displays the number of O's and 1's if the string is valid. Sample Output Enter a binary string: 00111 String is NOT valid! Again?Y Enter a binary string: 001111011 String is NOT valid! Again? Y String is valid with 0's 3 and 1's 6 Again? N

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!