zachwatson8133 zachwatson8133
  • 07-09-2019
  • Computers and Technology
contestada

What would the time complexity be for the size operation if there were not a count

Respuesta :

Branta Branta
  • 09-09-2019

Answer:

O(n)

Explanation:

If we wish to calculate the size of a list data structure where no count is available then the size operation will have a time complexity of O(n) where 'n' represents the number of existing elements of the list. This is because the operation will involve iterating through the entire list of size n via pointers till we reach the end of the list. So the time complexity will be n*O(1) or O(n).

Answer Link

Otras preguntas

Annika is attending college next year. She just got information on the college costs and the financial aid package the college is offering. Annika knows her par
In general, why does a toy car change direction when crossing a boundary between two surfaces, such as hard plastic and a carpet, on which its speed is differen
Why did the expansion of slavery become the most divisive political issue in the 1840s and 1850s?
Compare and contrast viruses and bacteria.
Need help on this question ASAP! Thanks I’m advanced !
solve using any method -x^2+x+12=0
What is the expression (3x²y³) ³​
Which type of writing system did both the Maya and the Egyptians develop? cuneiform hieroglyphics seals cursive
To solve the sustem of equations below, kira isolated variable y in the first equation then sybstituted it into the second equation.what was the resulting equat
Summarize the two stages of cellular respiration