Top "Big-o" questions

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

List of Big-O for PHP functions

After using PHP for a while now, I've noticed that not all built-in PHP functions are as fast as expected. …

php performance algorithm arrays 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
What would cause an algorithm to have O(log n) complexity?

My knowledge of big-O is limited, and when log terms show up in the equation it throws me off even …

algorithm big-o time-complexity logarithm
Maximum single-sell profit

Suppose we are given an array of n integers representing stock prices on a single day. We want to find …

arrays algorithm big-o time-complexity
Time complexity of Hash table

I am confused about the time complexity of hash table many articles state that they are "amortized O(1)" not true …

hashtable big-o
Search an element in a heap

I remembered that heap can be used to search whether an element is in it or not with O(logN) …

algorithm data-structures heap big-o
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
Detecting if a string has unique characters: comparing my solution to "Cracking the Coding Interview?"

I am working through the book "Cracking the Coding Interview" and I have come across questions here asking for answers, …

java string algorithm big-o time-complexity
What is O(log(n!)) and O(n!) and Stirling Approximation

What is O(log(n!)) and O(n!)? I believe it is O(n log(n)) and O(n^n)? …

big-o