Recent questions tagged algorithms

0 votes
0 answers
1741
Which of the following statement(s) is/are correct?P: DFS can be used for finding shortest paths in unweighted graphs and can also be used testing bipartitenessQ: BFS can...
0 votes
0 answers
1742
In a sorted array find a&b such that a+b>1000Given array is 100 200 300 400 500 600 700 800
1 votes
1 answer
1743
Arrange the following functions in asymptotically increasing orderf1(n) = n0.999999 log nf2(n) = 10000000nPlease explain your solution. Thanks
0 votes
2 answers
1744
Let f (n) = Ο(n), g(n) = Ο(n) and h(n) = θ(n).Then [f (n) . g(n)] + h(n) is : a) Ο(n) b)θ(n)I think it must be 0(n)
0 votes
1 answer
1745
given : 1/4 and 1 1/4 = theta(1)is this corrector only this 1/4 = O(1)
1 votes
1 answer
1746
2 votes
0 answers
1747
Can someone please prove or disprove the following conjecture?1. Let f(n) be a asymptotically positive function.$f(n) + o(f(n)) = \Theta(f(n))$Note that this is small-oh....
1 votes
1 answer
1749
T(n) = 2T(n/2) + nlogna. O(nlogn)b.n(log^2n)c.O(n^2)
0 votes
0 answers
1751
Insert these element in avl tree15,20,24,10,13,7,30,36,25And then delete 24,20Please explain step by stepI am confuse
4 votes
1 answer
1753
Match the following and choose the correct answer for the order $A,B,C,D$$$\begin{array}{|ll|ll|}\hline \text{A.} & \text{Strassen matrix multiplication} & \text{p.} & ...
2 votes
0 answers
1755
1 votes
1 answer
1758
Unlike greedy algorithms, dynamic programming method always provide correct/optimal solution.Is the above statement correct?
2 votes
1 answer
1759
If a simple undirected graph with positive weighted edges has 10 vertices and 30 edges, such that the cost of the Minimum Spanning tree is 59. Now, if all the edges weigh...
1 votes
1 answer
1760
In a sorted array, every element is repeated more than once except one. what will be the time complexity to find that element in the worst case?
0 votes
1 answer
1761
Consider the statements True/ FalseBellman Ford algorithm reports a shortest path from source to a destination only in a directed graph which has a negative cycle.
2 votes
1 answer
1762
Given a set of sorted files f1,f2,f3,f4,f5 of lengths 99,27,71,199,259 we need to merge these files into a single sorted file Using Optimal Merge Pattern.
0 votes
1 answer
1763
In the context of merge sort, which of the following are true?$1.\ T(n)\ =\ o(n^2)\\ 2.\ T(n)\ =\ O(n^2)\\3.\ T(n)\ =\ \omega(n)\\4.\ T(n)\ =\ \Omega(n) $
0 votes
0 answers
1764
0 votes
1 answer
1765
9 votes
2 answers
1769
How many distinct minimum weight spanning trees does the following undirected, weighted graph have ?$1$$2$$4$$6$$8$