Question
C++ Data Structure (You can download this source file as http://staffwww.fullcoll.edu/aclifton/courses/cs133_fa16/files/dlist.h.) You should save the above into dlist .h , and put the implementations of
C++ Data Structure
(You can download this source file as http://staffwww.fullcoll.edu/aclifton/courses/cs133_fa16/files/dlist.h.)
You should save the above into dlist.h, and put the implementations of the functions (and any methods that you dont want to implement in the class body) into dlist.cc. (If you want to, you can implement everything in dlist.h by writing the functions as inline, thus creating a header-only list library.) You should also create a file list_tests.cc containing a main which tests your list implementation in various ways, to make sure youve written everything correctly.
In this assignment, you will implement a doubly-linked list class. together with some list operations. To make things easier, you'll implement a list of int rather than a template class pragma once dlist. h Doubly linked lists of ints include Kostream class dlist public: d list struct node int value node next node prev; node' head() const return -head; node" tail() const t return -tail Implement ALL the following methods Returns the node at a particular index (0 is the head node at(int) Insert a new value, after an existing one void insert(node *previous int value Delete the given node void del (node which)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