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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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
Results tagged with Search options user 94479

Questions about the science and art of determining properties of algorithms, often including correctness, runtime and space usage. Use the [runtime-analysis] tag for questions about the runtime of algorithms.

1
vote
The summation rule of the big-O notation; Given $T_1(n) \in \mathcal{O}(f(n))$ and $T_2(n) \in \mathcal{O}(g(n))$, than $$T_1(n)+T_2(n) \in \mathcal{O}(\max(f(n),g(n)).$$ So, if you call $Func1()$ …
answered Nov 3 '18 by kelalaka
1
vote
Does Dijkstra’s assumes that the weights of edges in a graph searched by it are positive integers? Dijkstra’s shortest path algorithm works for non-negative numbers. The Bellman-Ford algori …
answered Dec 18 '18 by kelalaka
2
votes
We can write the for loop as the sums; $$\sum_{i=1}^{n} \sum_{j = 1}^{i} 1 = \sum_{i=1}^{n}i = \frac{n(n+1)}{2} \in\mathcal{O}(n^2) \, .$$ Note: set the starting values from $i = 1$ and $j = 1$, and …
answered Dec 23 '18 by kelalaka