You will be designing a non-member function that accepts as


Question: You need to write out using pseudo-code your algorithm.

You will be designing a non-member function that accepts as its argument one dynamic bag object (header file found in figure 4.9).  This function will return a reference to a new dynamic bag object. 

This new object will be a palindrome of the input object.  For this assignment you can assume that the class has an overloaded [ ] operator (array notation operator) that is used to access the elements of the bag. 

Also, the "pivot" point in the array will be repeated.  This means that the palindrome will be of the form 1234554321 and not 123454321 (notice that the pivot of 5 is repeated).

After you prepare your algorithm you would like to tell me what its time complexity is using Big-O notation. Can you evaluate the time complexity of this algorithm?

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: You will be designing a non-member function that accepts as
Reference No:- TGS0954867

Expected delivery within 24 Hours