Question: 1) Given two algorithms with the following running time: Algorithm A: Ta(n)=4n+20 and Algorithm B: Tb(n)=2 n+10 Which of the following statements are correct? A)

 1) Given two algorithms with the following running time: Algorithm A:

1) Given two algorithms with the following running time: Algorithm A: Ta(n)=4n+20 and Algorithm B: Tb(n)=2 n+10 Which of the following statements are correct? A) Algorithm A is faster than algorithm B for n> 100. B) Algorithm B is faster than algorithm A for n> 100. C) Algorithm A is as fast as algorithm B for all values of n D) All of the above statements are correct. 2) Given a singly-linked list with n nodes and head is pointing to the first node of the list. The worst case time to delete a node is: A) O(1) B) O(n) C) O(n log n) D) O(n) 3) Given a complete binary search tree with n nodes and root is pointing to the root of the tree. The time to delete a leaf node is: A) O(1) B) O(log n) C) O(n log n) D) O(n)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!