luscious9944 luscious9944
  • 08-01-2021
  • Computers and Technology
contestada

Which of the basic data structures is the most suitable if you want to be able to insert elements in the middle in O(1)?
A. Array
B. Queue
C. Linked list
D. Stack

Respuesta :

IfeanyiEze8899 IfeanyiEze8899
  • 10-01-2021

Answer:

A. Array

Explanation:

An array is a data structure that holds a collection of similar data types. Though it is ordered, the location of the array is indexed, which means that the items of the array can be accessed and retrieved with their index location values (starting from 0 to n).

The time complexity of accessing or retrieving a specific item in an array is O(1) which is a constant of the specified item.

Answer Link

Otras preguntas

Chin bought 12 pounds of apples for $6 at this rate how much will is cost to buy 3 pounds of apples
the combustion of propane may be described by the chemical equation, C3H8(g) + 5O2(g) --> 3CO2(g) + 4H2O(g) how many grams of O2(g) are needed to completely
Why did some alpha particles bounce off the gold foil?
A man who is 74 inches tall stands beside a palm tree. The length of the man's shadow is 26 inches. The palm tree's shadow is 80 inches long. How tall is the pa
What is the meaning of accounting.
what are the three particles of an atom
8y-10=-3y+2 what does that equal?
A TV at an electronics store originally costs $600, but it is on sale for 30% off. If a customer buying the TV has a coupon for $35.00 off of any purchase, what
There are 16 girls and 20 boys in the school band what is the ratio in the simplest form of girls to boys ?
How old was Thomas Jefferson when he died?