### What is the complexity of this nested triple for loop??

I have searched a bit on StackOverflow and have understood the complexity up to the point of the j-loop, which is O(...

### Is 2^(2n) = O(2^n)?

Is 2(n+1) = O(2n)? I believe that this one is correct because n+1 ~= n. Is 2(2n) = O(2n)? This one seems like i...

### HashMap Space Complexity?

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

### Can someone explain how Big-Oh works with Summations??

I know this isn't strictly a programming question, but it is a computer science question so I'm hoping someone can h...

### 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...

### Time complexity of nested for-loop?

I need to calculate the time complexity of the following code: for (i = 1; i <= n; i++) { for(j = 1; j <= i...

### What is the Big-O of String.contains() in Java??

I'm working on a project, and need to optimize the running time. Is String.contains() runtime the same as TreeSet.c...

### Computational complexity of Fibonacci Sequence?

I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been tryin...

### Which is better: O(n log n) or O(n^2)?

Okay so I have this project I have to do, but I just don't understand it. The thing is, I have 2 algorithms. O(n^2) ...

### Determining complexity for recursive functions (Big O notation)?

I have a Computer Science Midterm tomorrow and I need help determining the complexity of these recursive functions. ...