Implementation LanguageIf code is given or required, it should be in C++
Question Given the structure:
Write a search function that scans a passed array of BankAcnt type to find an account with a passed number and resets the account balance to zero and returns “true”. If the account is not found, it just returns “false”. The operator “” is not allowed anywhere in the function and the size of the array is unknown but, the array always maintains a sentinel BankAcnt with a (number = -1).
Question Given the STL two containers: forward_list and stack, write two functions to:
a) Reverse print the objects of a forward_list using recursion.
b) Reverse print the objects of a forward_list using iteration and stack.
Question Write a function that prints a <queue> elements in reverse order using any helper STL container but the <stack>.
Question Given a singly-linked list template class write the implementation code of “bool deleteNode(T& obj)”. Assume that the “==” is overloaded in T.
Question Given a doubly-linked list template class write the implementation code of “bool deleteNode(T& obj)”. Assume that the “==” is overloaded in T.
Question Write a template function that implements recursive linear search. Assume that the “==” is overloaded in T.
Question Write a recursive search function member of the template class “ChainedHashTable”.
Question 1. .
10. .11. . template <class Type>
void queueType<Type>::addQueue(const Type* newElement)
queueRear = (queueRear + 1) % maxQueueSize;
list(queueFront) = newElement;
cout << "Cannot add to a full queue." << endl;
a) Explain Line (5).
b) Find and correct any syntactical or logical errors.
Question Write a recursive “insert” function member of the template class “BinSearchTree”.
Question Write a recursive “average” function member of the template class “BinSearchTree”.
Question Write a recursive max() function member of the template class “BinSearchTree”.
Question Given the three sorting algorithms: Quick, Merge, and Heap sort, do the following:
1) Analyze their T(n) as a big O for worst and best case scenario.
2) Write the main concept of each in no more than three lines.
Question For each of the following, give and justify the most efficient data structure and algorithm to solve the given problem:
a) A dynamically sorted table is needed to maintain information of 100 employees using their SSN.
b) A dynamic unsorted table is needed to maintain information of 100 items using 16-char string ID.
c) A dynamic data structure is needed to manage a waiting line for an emergency service at a hospital. The patients have different priorities depending on their health urgency.
Note: Dynamic implies frequent insertion and deletion.