Top "Big-o" questions

The Big-O notation is used to represent asymptotic upper bounds.

O(log N) == O(1) - Why not?

Whenever I consider algorithms/data structures I tend to replace the log(N) parts by constants. Oh, I know log(…

performance algorithm computer-science big-o
Asymptotic complexity of .NET collection classes

Are there any resources about the asymptotic complexity (big-O and the rest) of methods of .NET collection classes (Dictionary<…

.net collections big-o asymptotic-complexity
Solving the recurrence T(n) = T(n/2) + lg n?

I am having some issues on how to solve recurrence relations. T(n) = T(n/2) + log2(n), T(1) = 1, where n …

algorithm math big-o recurrence master-theorem
Finding the minimum in an unsorted array in logarithmic time

Is there an algorithmic approach to find the minimum of an unsorted array in logarithmic time ( O(logn) )? Or is …

arrays complexity-theory big-o minimum
Slowest Computational Complexity (Big-O)

Out of these algorithms, I know Alg1 is the fastest, since it is n squared. Next would be Alg4 since …

algorithm big-o computation-theory
The Big O on the Dijkstra Fibonacci-heap solution

From Wikipedia: O(|E| + |V| log|V|) From Big O Cheat List: O((|V| + |E|) log |V|) I consider there …

algorithm big-o dijkstra
Complexity of the memset function in C

I was discussing with some friends a piece of code, and we discussed about using memset function in C, which …

c complexity-theory big-o memset
Efficiently finding the intersection of a variable number of sets of strings

I have a variable number of ArrayList's that I need to find the intersection of. A realistic cap on the …

java theory set big-o intersection
Is bit shifting O(1) or O(n)?

Are shift operations O(1) or O(n) ? Does it make sense that computers generally require more operations to shift 31 places …

language-agnostic big-o cpu hardware bit-shift
HashMap Space Complexity

Here's a sample solution for "Populating Next Right Pointers in Each Node" puzzle: Populate each next pointer to point to …

java algorithm hashmap big-o space-complexity