(Solved) : Given Vector Sets Ints Vector Set V Assume Vector V N Total Sets Set Average Q Items Big Q32904447 . . .
Given a vector of sets of ints, vector< set > v, assumethe vector v has N total sets and that each set has an average of Qitems.
a. What is the Big-O of determining if the first set, v[0],contains the value 7?
b. What is the Big-O of determining if any set in v has the value7?
c. What is the Big-O of determining the number of even values inall of v?
d. What is the Big-O of finding the first set with a value of 7 andthen counting the number of even values in that set?
Determine the data structure needed if we wanted to maintain abunch of peoples’ names and for each person, allows us to easilyget all of the streets they lived on. Assume there are P totalpeople and each person has lived on average E former streets.
What is the Big-O cost of:
a. Finding the names of all people who lived on “LeveringStreet”?
b. Determining if “Bill” ever lived on “Westwood Blvd”?
c. Printing out every name along with each person’s streetaddresses in alphabetical order?
d. Printing out all the streets that “Tala” has lived on?
Expert Answer
Answer to Given Vector Sets Ints Vector Set V Assume Vector V N Total Sets Set Average Q Items Big Q32904447 . . .
OR