Question: Why do you need to use shared pointers in the Node and LinkedList classes instead of a different type of smart pointer? The methods in

Why do you need to use shared pointers in the Node and LinkedList classes instead of a different type of smart pointer?
The methods in the Node and LinkedList classes require aliases in order to perform the required processing.
These ADTs define their own destructors. When you use destructors you must use shared pointers.
You don't need to use shared pointers. You can use other types of smart pointers to process the objects.
These ADTs must use as little memory as possible which is achieved through the use of shared pointers

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 Programming Questions!