jacquiii8772 jacquiii8772
  • 22-08-2019
  • Computers and Technology
contestada

)in the link based implementation of the ADT sorted list what is the worst case time efficiency of the remove method?

A. O(1)

B.O(logn)

C.O(n)

D.O(n2)

Respuesta :

ExieFansler ExieFansler
  • 27-08-2019

Answer:

C.O(n).

Explanation:

The worst case time complexity of remove method in linked list based implementationof  ADT  sorted list  is O(n) . The worst  case would be  when you  have to remove the  element that is placed at the end.So we have to traverse  the whole  list and reach upto that node then remove that node or element.

Answer Link

Otras preguntas

What is censorship ?
Where is the ozone layer located? Exosphere Mesosphere Stratosphere Troposphere 10 points!!!
What is the time complexity of the contains operation and the find operation for both implementations?
Prokaryotes adapt to hot temperatures by increasing the length of their hydrophobic tails and decreasing the amount of double bonds in their phospholipid bilaye
Q.2 The x coordinate of a point p is twice its y-coordinate. If p is equidistant from Q (2,-5) and R (-3, 6) find the coordinates of p. Q.3 Find the ratio in wh
If you are not wearing a seat belt and the car you are driving hits a fixed barrier, you will hit the steering wheel. This is because __________. If you are not
What is suppression ?
Name some pros about air pollution
what is 6 feet, 2 inches plus 4 feet, 8 inches ?
People with the genetic disorder Xeroderma pigmentosum a. have no direct DNA repair mechanisms. b. cannot repair UV induced DNA damage c. do not express mism