Q17: Person A proudly shows off an implementation of a stack class with member functions size, empty, push, pop and top. Person B comments that structure would greatly benefit from the addition of an iterator. A's best response suggestion is which? this is a nice start, but that the stack to 's (a) Disagree with B pointing out that an iterator would render the stack class pointless (b) Agree with B because more functionality is always better. Q18. What does the following code fragment compute for a given List mylst of integers? Assume that the list is not empty and elements are stored in ascending order of their values List#iterator Listcintsiiterator while (erue) - ayst.beg in ( ); -mylst.endo l 12 e if (il12) breaka 12) break if (?l-- i2) return il else return il2)/2: (a) The middle element of the vector. (b) The median value of the vector. (c) The average between the smallest and largest value in the vector. (d) This won't work Q19: When implementing an algorithm that necessitates frequent insertion and deletion of values into a data structure which is meant to maintain the sortedness of its values, which data structure will be the preferred choice in light of computational costs? (a) Plain array. (b) Vector data structure. (c) Linked list data structure. (d) Any of the above will do. Q20: The following statements are made about binary search for a target value in a vector data structure: (1) The cost of finding the target is Oflog N) on average, but it can be as high as o(w) (2) The number of elements in a vector must be odd for binary search to work. (3) Binary search needs the vector elements stored in sorted order. (4) Binary search works equally well on all types of linear data structures. True statements are (c) (3) and (4) (d) 3 only (b) (1), (3) and (4)