Top "Time-complexity" questions

The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the size of the input to the problem.

Finding contiguous ranges in arrays

You are given an array of integers. You have to output the largest range so that all numbers in the …

arrays algorithm time-complexity space-complexity
Time complexity analysis for finding the maximum element

I've encountered a homework problem: which of these is an asymptotically tight upper bound for the best-case running time of …

algorithm big-o time-complexity lower-bound
How do you derive the time complexity of alpha-beta pruning?

I understand the basics of minimax and alpha-beta pruning. In all the literature, they talk about the time complexity for …

time-complexity artificial-intelligence alpha-beta-pruning
C++ std::unordered_map complexity

I've read a lot about unordered_map (c++11) time-complexity here at stackoverflow, but I haven't found the answer for my …

c++ stl iteration time-complexity unordered-map
Longest Common Subsequence

Consider 2 sequences X[1..m] and Y[1..n]. The memoization algorithm would compute the LCS in time O(m*n). Is …

time-complexity dynamic-programming lcs
Time complexity versus space complexity in Turing machines

I think defenitions of time complexity and space complexity for Turing machines are identical and I can't differentiate between them. …

algorithm complexity-theory time-complexity turing-machines space-complexity
Python collections.Counter: most_common complexity

What is the complexity of the function most_common provided by the collections.Counter object in Python? More specifically, is …

python time-complexity counter python-collections
Prim's Algorithm Time Complexity

I was looking at the Wikipedia entry for Prim's algorithm and I noticed that its time complexity with an adjacency …

algorithm graph-theory time-complexity prims-algorithm
Complexity when generating all combinations

Interview questions where I start with "this might be solved by generating all possible combinations for the array elements" are …

algorithm language-agnostic big-o time-complexity combinations
Add to SortedSet<T> and its complexity

MSDN states the following SortedSet(T).Add Method : If Count is less than the capacity of the internal array, this …

c# time-complexity sortedset