Top "Big-o" questions

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

Python dictionary keys. "In" complexity

Quick question to mainly satisfy my curiosity on the topic. I am writing some large python programs with an SQlite …

python dictionary hashmap complexity-theory big-o
Is Big O(logn) log base e?

For binary search tree type of data structures, I see the Big O notation is typically noted as O(logn). …

math binary-tree complexity-theory big-o
Which algorithm is faster O(N) or O(2N)?

Talking about Big O notations, if one algorithm time complexity is O(N) and other's is O(2N), which one …

algorithm big-o
Big O confusion: log2(N) vs log3(N)

Why is O(log2N) = O(log3N) ? I don't understand this. Does big O not mean upper bound of …

math big-o logarithm
Time complexity of a Priority Queue in C++

Creating a heap takes O(n) time while inserting into a heap (or priority queue) takes O(log(n)) time. …

c++ algorithm big-o priority-queue
Big-O for Eight Year Olds?

I'm asking more about what this means to my code. I understand the concepts mathematically, I just have a hard …

algorithm theory big-o metrics
Stack with find-min/find-max more efficient than O(n)?

I am interested in creating a Java data structure similar to a stack that supports the following operations as efficiently …

java algorithm data-structures stack big-o
What is the complexity of regular expression?

What is the complexity with respect to the string length that takes to perform a regular expression comparison on a …

regex complexity-theory big-o
I need help proving that if f(n) = O(g(n)) implies 2^(f(n)) = O(2^g(n)))

In a previous problem, I showed (hopefully correctly) that f(n) = O(g(n)) implies lg(f(n)) = O(lg(…

big-o logarithm proof
Recurrence Relation: Solving Big O of T(n-1)

I'm solving some recurrence relation problems for Big O and so far up till this point have only encountered recurrence …

big-o recurrence