Reference no: EM133218538
Question: Consider the following algorithm:
procedure sort_and_find (target, directory)
sorted_list <- sort(directory)
index <- find(target, sorted_list)
return index
end procedure
Part 1 Let n be the length of the list, directory.
Assume the procedure, sort, is order Θ(n4) and the procedure, find, is order Θ(log n).
What is the order of sort_and_find? Write your answer in Big Θ notation:.
Part 2 Let n be the length of the list directory.
Assume the procedure, sort, is order Θ(1) and the procedure, find, is order Θ(n).
What is the order of sort_and_find? Write your answer in Big Θ notation.