Question: For all questions below justify the answer ( a ) Order the following four functions from asymptotically smallest to asymptotically largest, indicating ties if there
For all questions below justify the answer
a Order the following four functions from asymptotically smallest to asymptotically largest,
indicating ties if there are any: lgn lg n lg lg n nnn n
b What is the worst case time complexity for binary search on a BST with n elements and
why?
c An algorithm takes billion times longer to process n elements than it does to process
n elements. Give a possible time complexity for this algorithm.
d Your coworker has implemented binary search for sorted lists. Assuming a linked list
with n elements, explain why this algorithm will be slower on average than using linear
search. What is the average time complexity of this algorithm?
e Insertion sort is generally considered "efficient" when the array is nearly sorted. Explain
why.
f You are given the inorder and postorder traversals of a binary search tree:
Inorder traversal:
Postorder traversal:
Construct and draw the binary search tree from these traversals and briefly explain your approach
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
