Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider a Graph class that stores the graph using a n EdgeList data structure. When answering the following runtime questions, give the most specific runtime
Consider a Graph class that stores the graph using EdgeList data structure. When answering the following runtime questions, give the most specific runtime bound you can: a BigTheta bound exists, give that, otherwise give the tightest upper bound you can.
Derive the unqualified worstcase runtime terms and
perform a search a Graph that implemented using EdgeList. Justify
your answer. Note:
points perform a search the graph, may first compute the AdjacencyList and then searched the graph. What the total unqualified worstcase
runtime terms and compute the AdjacencyList and then perform
the search.
points Based on your answers to the previous questions is it worth it to take the
time to compute the AdjacencyList before performing BFS if your input Graph is
implemented using an EdgeList? Why or why not? In at most three sentences,
explain the reason.
points Now imagine instead of searching a Graph of data, we are searching
an ArrayList of data. If the ArrayList contains n elements, what is the unqualified
worstcase runtime in terms of n to: Find a specific value in the ArrayList?
Sort the ArrayList? Find a specific value in the sorted ArrayList? What is
the runtime to perform n searches in row on the original ArrayList? What is
the runtime to perform n searches in row on the sorted ArrayList?
points Base on your answers to the previous questions, is it worth it to sort the
ArrayList first and then perform n searches? Justify your answer in at most
three sentences. Answers without justificiaton will not receive credit.
points Now imagine ArrayList contains the statistics for every player in the
National Football League, and you want to find the players that have scored
the most points. Is it worth it to sort the list by points scored before doing the
search? Justify your answer in at most three sentences, answers without
justification will not receive credit.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started