Respuesta :

True: Inserting into an unsorted list and deleting from an unsorted list are the same time complexity.

What is the time complexity of inserting and deleting?

  • If you don't know the location, then you need to traverse the list to the location of deletion/insertion, which takes O(n) time.  The deletion cost is O(log n) for the minimum or maximum, O(n) for an arbitrary element. There is some confusion in deletion in array.
  • Finding the element you want to delete takes O(n) time. Then, to delete it, move all elements to the right of it one space to the left. Because this is also O(n), the overall complexity is linear.
  • Inserting an element in the middle of an array has a computational complexity of O(N), where N is the number of elements in the array.
  • The elements in the array must all be shifted up one index after the insertion, or all the elements must be copied to a new array big enough to hold the inserted element.

To learn more about complexity refer to

https://brainly.com/question/1870140

#SPJ4