All functions should belong to a template class. Functions' code should be efficient as well as correct. For all linked lists, first points to the first node and it is the only pointer in the list...


C++


All functions should belong to a template class. Functions' code should be efficient as well as correct.<br>For all linked lists, first points to the first node and it is the only pointer in the list (there is no last).<br>For circular sorted lists first points to the largest element.<br>Write a function, to be included in an unsorted linked list class, called replace item, that will receive two<br>parameters, one called olditem, the other called newitem. The function will replace all occurrences of olditem<br>with newitem ( if olditem exists !! ) and it will return the number of replacements done.<br>Write a function, to be included in a sorted linked list class, called printPosition, that will receive a parameter<br>and print its position within the list (position 1 if first, position 2 if second...). If the item is not in the list,<br>specify it in a printing. Consider efficiency.<br>Write a function, to be included in an unsorted linked list class, called getLargest, that will return the largest<br>item in the list.<br>www<br>

Extracted text: All functions should belong to a template class. Functions' code should be efficient as well as correct. For all linked lists, first points to the first node and it is the only pointer in the list (there is no last). For circular sorted lists first points to the largest element. Write a function, to be included in an unsorted linked list class, called replace item, that will receive two parameters, one called olditem, the other called newitem. The function will replace all occurrences of olditem with newitem ( if olditem exists !! ) and it will return the number of replacements done. Write a function, to be included in a sorted linked list class, called printPosition, that will receive a parameter and print its position within the list (position 1 if first, position 2 if second...). If the item is not in the list, specify it in a printing. Consider efficiency. Write a function, to be included in an unsorted linked list class, called getLargest, that will return the largest item in the list. www

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here