Question 1: Write me a function that finds the smallest item in an ArrayBag (by reference) and returns true if the arrayBag is not empty and false otherwise.
bool ArrayBag::smallest(ItemType& item)
Question 2: Tell me how you would be able to test 2 ArrayBags for equality, where equality means the Bags have the same items and the same frequencies for each item. Remember that the arrays might not be in the same order, though.
Question 2: Your classmate believes that her resize() function is causing her ArrayBag code to fail with a segmentation fault. Therefore, she wants to comment out the line in resize with the delete[].
Where else is she likely to see a segmentation fault if she goes ahead with this plan?
Prepare a function that the smallest item in an array.