answersLogoWhite

0


Best Answer

* search array => O(1) linked list=> O(n) binary tree=> O(log n) hash=>O(1) * search array => O(1) linked list=> O(n) binary tree=> O(log n) hash=>O(1)

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Complexity of an algorithm in data structure?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What data structure and logarithm?

data structure is a way of storing data in a computer so that it can be used efficientlyan algorithm is a sequence of instructions, often used for calculation and data processing.Often a carefully chosen data structure will allow the most efficient algorithm to be used.


Calculate the Time and Space complexity for the Algorithm to add 10 numbers?

The algorithm will have both a constant time complexity and a constant space complexity: O(1)


What is time complexity and space complexity?

"Running Time" is essentially a synonym of "Time Complexity", although the latter is the more technical term. "Running Time" is confusing, since it sounds like it could mean "the time something takes to run", whereas Time Complexity unambiguously refers to the relationship between the time and the size of the input.


What are the two main measures for the efficiency of an algorithm?

Time complexity and space complexity.


Why time complexity is better than actual running time?

Finding a time complexity for an algorithm is better than measuring the actual running time for a few reasons: # Time complexity is unaffected by outside factors; running time is determined as much by other running processes as by algorithm efficiency. # Time complexity describes how an algorithm will scale; running time can only describe how one particular set of inputs will cause the algorithm to perform. Note that there are downsides to time complexity measurements: # Users/clients do not care about how efficient your algorithm is, only how fast it seems to run. # Time complexity is ambiguous; two different O(n2) sort algorithms can have vastly different run times for the same data. # Time complexity ignores any constant-time parts of an algorithm. A O(n) algorithm could, in theory, have a constant ten second section, which isn't normally shown in big-o notation.

Related questions

Case complexity in data structure algorithms?

The complexity of an algorithm is the function which gives the running time and/or space in terms of the input size.


What data structure and logarithm?

data structure is a way of storing data in a computer so that it can be used efficientlyan algorithm is a sequence of instructions, often used for calculation and data processing.Often a carefully chosen data structure will allow the most efficient algorithm to be used.


Calculate the Time and Space complexity for the Algorithm to add 10 numbers?

The algorithm will have both a constant time complexity and a constant space complexity: O(1)


What is time complexity and space complexity?

"Running Time" is essentially a synonym of "Time Complexity", although the latter is the more technical term. "Running Time" is confusing, since it sounds like it could mean "the time something takes to run", whereas Time Complexity unambiguously refers to the relationship between the time and the size of the input.


What is complsexity of an algorithm?

Complexity of an algorithm is a measure of how long an algorithm would take to complete given


Why time complexity is better than actual running time?

Finding a time complexity for an algorithm is better than measuring the actual running time for a few reasons: # Time complexity is unaffected by outside factors; running time is determined as much by other running processes as by algorithm efficiency. # Time complexity describes how an algorithm will scale; running time can only describe how one particular set of inputs will cause the algorithm to perform. Note that there are downsides to time complexity measurements: # Users/clients do not care about how efficient your algorithm is, only how fast it seems to run. # Time complexity is ambiguous; two different O(n2) sort algorithms can have vastly different run times for the same data. # Time complexity ignores any constant-time parts of an algorithm. A O(n) algorithm could, in theory, have a constant ten second section, which isn't normally shown in big-o notation.


What are the two main measures for the efficiency of an algorithm?

Time complexity and space complexity.


Does the complexity of the solution to a problem depend upon the right choice of data structure?

perhaps...


What is the time complexity of Dijkstra's algorithm?

Dijkstra's original algorithm (published in 1959) has a time-complexity of O(N*N), where N is the number of nodes.


What is are the time complexity or space complexity of DES algorithm?

time complexity is 2^57..and space complexity is 2^(n+1).


Write a algorithm for a deque operations?

please read data structure (schaum series) books


What is efficent Algorithm?

Basically it depends on your condition of the program but one should have these things in mind while making/writing an algorithm..... 1. Use minimum variable as much as possible. 2. Try to use the pointers instead of array's to allocate the memory at the run time. 3. Always check for the time and space complexity for the algorithm. 4. Use the exact data structure for the given problem.