Top "Complexity-theory" questions

Computational complexity theory is a branch of the theory of computation in theoretical computer science and mathematics that focuses on classifying computational problems according to their inherent difficulty.

Constant Amortized Time

What is meant by "Constant Amortized Time" when talking about time complexity of an algorithm?

algorithm complexity-theory big-o
Cost of len() function

What is the cost of len() function for Python built-ins? (list/tuple/string/dictionary)

python algorithm collections complexity-theory
What would cause an algorithm to have O(log log n) complexity?

This earlier question addresses some of the factors that might cause an algorithm to have O(log n) complexity. What …

algorithm big-o time-complexity complexity-theory logarithm
Time complexity of python set operations?

What is the the time complexity of each of python's set operations in Big O notation? I am using Python's …

python data-structures set complexity-theory big-o
Difference between O(n) and O(log(n)) - which is better and what exactly is O(log(n))?

This is my first course in data structures and every lecture / TA lecture , we talk about O(log(n)) . This …

algorithm data-structures complexity-theory big-o logarithm
What is the big-O of the function (log n)^k

What is the big-O complexity of the function (log n)k for any k?

algorithm math complexity-theory big-o logarithm
B-Tree vs Hash Table

In MySQL, an index type is a b-tree, and access an element in a b-tree is in logarithmic amortized time …

mysql data-structures computer-science complexity-theory b-tree
Complexity of recursive factorial program

What's the complexity of a recursive program to find factorial of a number n? My hunch is that it might …

complexity-theory factorial
multiset, map and hash map complexity

I would like to know the complexity in Big O notation of the STL multiset, map and hash map classes …

c++ complexity-theory big-o
Are there any O(1/n) algorithms?

Are there any O(1/n) algorithms? Or anything else which is less than O(1)?

theory complexity-theory big-o