Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions related to the (computational) complexity of solving problems
2
votes
Accepted
Is $n\log n + n\log \log n = \Theta(\log n)$?
As you stated, $n\log n + n \log \log n = \Omega(n\log n)$. Now, recall that $\Omega$ notation indicates an asymptotic lower-bound. This means that for sure $n\log n + n \log \log n$ can't be asymptot …
4
votes
Accepted
How can I prove that '+' is same as max?
For $n,m \geq 0$ we have:
$$ \max(n, m) \ \leq \ m + n \ \leq \ 2\cdot \max(n,m) \ .$$
Now, $\max(n, m) =\Theta(\max(n, m))$ and $2\max(n, m) = \Theta(\max(n, m))$, so also the middle term is $\The …
5
votes
Big-O time complexity for this code snippet
You are right, the two innermost loops perform $\Theta(\log n)$ iterations each, so we have a total of $\Theta(\log^2 n)$ iterations, which are repeated $\Theta(n)$ times in the outer loop, which impl …