Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged time-complexity
0
votes
0
answers
31
bfs dfs
Which of the following statements is/are correct? Consider 'n' as the number of nodes in graph. A.In an unweighted, undirected connected graph, Dijkstra's algorithm can be used to compute shortest path from node S to all the other vertices. B.Bellman's ... of vertices and adjacency matrix is theta(n^2) D.The time complexity of Bellman's ford algorithm is always theta(n^3)
Which of the following statements is/are correct?Consider 'n' as the number of nodes in graph.A.In an unweighted, undirected connected graph, Dijkstra’s algorithm can b...
24aaaa23
226
views
24aaaa23
asked
Oct 2, 2023
Algorithms
algorithms
bellman-ford
time-complexity
+
–
0
votes
1
answer
32
algorithms
Let G1 (V, E) be a connected undirected graph and G2 (V1, E') be the subgraph of G1. Weights are assigned to the edges of G1. W(e) = 0; if e belongs to E' = 1 , otherwise. Single source shortest path algorithms is applied on G1 ... all pair of vertices and stored in a matrix. What will be additional time complexity (strict upper bound) to determine if G2 is connected or not.
Let G1 (V, E) be a connected undirected graph and G2 (V1, E') be the subgraph of G1. Weights are assigned to the edges of G1.W(e) = 0; if e belongs to E' = 1 , o...
24aaaa23
262
views
24aaaa23
asked
Oct 1, 2023
Algorithms
algorithms
shortest-path
time-complexity
+
–
1
votes
1
answer
33
test series
int i,j,k,s=0; for(i=1; i<=n; i++) { for(j=1 ; j<=i; j=j*2) { for(k=n; k>1;k=k/2) { s++; } } } What will be the time complexity of the above code?
int i,j,k,s=0; for(i=1; i<=n; i++) { for(j=1 ; j<=i; j=j*2) { for(k=n; k>1;k=k/2) { s++; } } }What will be the time complexity of the above code?
viral8702
449
views
viral8702
asked
Sep 1, 2023
Algorithms
zeal
algorithms
time-complexity
asymptotic-notation
+
–
0
votes
1
answer
34
We are given a directed graph, represented as an adjacency list, in which each vertex has at least one incoming edge and one outgoing edge. We would like to print out for each vertex j the list of vertices pointing into j. What is the most accurate description of the complexity of computing these quantities in terms of n, the number of vertices, and m, the number of edges? O(n2) O(nm) O(m) O(n)
sonalrawat
687
views
sonalrawat
asked
Aug 21, 2023
Algorithms
algorithms
time-complexity
+
–
0
votes
1
answer
35
Algorithm
Answer ????
Answer ????
Overflow04
252
views
Overflow04
asked
Aug 13, 2023
Algorithms
algorithms
time-complexity
+
–
0
votes
0
answers
36
Made Easy Test Series 2024
Suppose we have a directed graph G = (V,E) with V= {1, 2, ..., n} and Eis presented as an adjacency list. For each vertex u in V, out(u) is a list such that (u, v) in {1, 2, ... k). For each u in V, we wish to compute a corresponding list in(u) =such that in E ... take to construct the lists in(u), u in V, from the lists out(u), u in V? T(n) =O(n+m) B. T(n)= O(n(m+n))
Suppose we have a directed graph G = (V,E) with V= {1, 2, ..., n} and Eis presented as an adjacency list. For each vertex u in V, out(u) is a list such that (u, v) in {1,...
Ray Tomlinson
528
views
Ray Tomlinson
asked
Aug 9, 2023
Algorithms
made-easy-test-series
algorithms
made-easy-booklet
algorithm-design
time-complexity
linked-list
graph-theory
graph-algorithms
+
–
0
votes
1
answer
37
Made Easy Test Series 2024
How many times is the comparison $i >= n$ performed in the following program? int i = 200 n = 80; main() { while (i >= n) { i = i - 2 n = n + 1 } }
How many times is the comparison $i >= n$ performed in the following program?int i = 200 n = 80; main() { while (i >= n) { i = i - 2 n = n + 1 } }
Ray Tomlinson
461
views
Ray Tomlinson
asked
Aug 9, 2023
Algorithms
algorithms
algorithm-design
loop-invariants
loop
time-complexity
+
–
1
votes
1
answer
38
Made Easy Test Series 2024
Which of the following statement(s) is/are true? (a) Quicksort and merge sort are both examples of divide and conquer algorithms. (b) If we randomly choose a pivot element each time, quicksort will always terminate in time $O(n log n).$ (c) For every fixed ... in time $O(1)$, quicksort would have worst case complexity $O(n log n)$. plese give answer and explain it why ?
Which of the following statement(s) is/are true?(a) Quicksort and merge sort are both examples of divide and conquer algorithms.(b) If we randomly choose a pivot element ...
Ray Tomlinson
857
views
Ray Tomlinson
asked
Aug 9, 2023
Algorithms
made-easy-test-series
made-easy-booklet
algorithms
divide-and-conquer
quick-sort
merge-sort
time-complexity
+
–
0
votes
1
answer
39
Algorithm Array Time complexity on splitting
If an array is split in the form of increasing and decreasing order then what is TC to find minimum element in the array?
If an array is split in the form of increasing and decreasing order then what is TC to find minimum element in the array?
NeelParekh
277
views
NeelParekh
asked
Jul 27, 2023
Algorithms
algorithms
time-complexity
+
–
0
votes
1
answer
40
Ace textbook
What is the time complexity of best algorithm that decides whether a given directed graph represented as adjacency Matrix contains a sink or not ? (a)O(V^2) (b)O(VlogV) (c)O(V^2logV) (d)O(V)
What is the time complexity of best algorithm that decides whether a given directedgraph represented as adjacency Matrix contains a sink or not ?(a)O(V^2)(b)O(VlogV)(c)O(...
Aniket1710
338
views
Aniket1710
asked
Jul 11, 2023
Algorithms
algorithms
time-complexity
matrix
+
–
Page:
« prev
1
2
3
4
5
6
7
...
53
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register