Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
0
votes
0
answers
1741
test series
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 bipartiteness Q: BFS can be used for topological sorting and finding strongly connected components.
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...
RAVI HOODA
346
views
RAVI HOODA
asked
Dec 25, 2017
Algorithms
algorithms
+
–
0
votes
0
answers
1742
gate notebook
In a sorted array find a&b such that a+b>1000 Given array is 100 200 300 400 500 600 700 800
In a sorted array find a&b such that a+b>1000Given array is 100 200 300 400 500 600 700 800
jerryberry
646
views
jerryberry
asked
Dec 24, 2017
Algorithms
algorithms
+
–
1
votes
1
answer
1743
test series
Arrange the following functions in asymptotically increasing order f1(n) = n0.999999 log n f2(n) = 10000000n Please explain your solution. Thanks
Arrange the following functions in asymptotically increasing orderf1(n) = n0.999999 log nf2(n) = 10000000nPlease explain your solution. Thanks
Tridhara Chakrabarti
615
views
Tridhara Chakrabarti
asked
Dec 24, 2017
Algorithms
algorithms
logarithmic-function
test-series
+
–
0
votes
2
answers
1744
Algo-test
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)
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)
junaid ahmad
380
views
junaid ahmad
asked
Dec 24, 2017
Algorithms
algorithms
asymptotic-notation
test-series
+
–
0
votes
1
answer
1745
doubt in asymptotic notation
given : 1/4 and 1 1/4 = theta(1) is this correct or only this 1/4 = O(1)
given : 1/4 and 1 1/4 = theta(1)is this corrector only this 1/4 = O(1)
sumit goyal 1
206
views
sumit goyal 1
asked
Dec 23, 2017
Algorithms
algorithms
asymptotic-notation
+
–
1
votes
1
answer
1746
ACE test series
please help me to understand
please help me to understand
VIKRAM KASANA
659
views
VIKRAM KASANA
asked
Dec 21, 2017
Algorithms
algorithms
time-complexity
divide-and-conquer
ace-test-series
+
–
2
votes
0
answers
1747
DAA: growth of functions
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.
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....
Manu Thakur
765
views
Manu Thakur
asked
Dec 20, 2017
Algorithms
algorithms
asymptotic-notation
time-complexity
+
–
3
votes
1
answer
1748
Which of the following options provides the increasing order of asymptotic complexity of functions
Which of the following options provides the increasing order of asymptotic complexity of functions(Note: Consider log base 2) a) f1(n)=n logn log logn b) f2(n)=(n!)^1/n c) f3(n)=(n^n^(0.5)) d) ... ^n At first glance I thought f2 grow faster but i was wrong. Ans : f2,f4,f1,f3 Please can somebody help.
Which of the following options provides the increasing order of asymptotic complexity of functions(Note: Consider log base 2)a) f1(n)=n logn log lognb) f2(n)=(n!)^1/nc) f...
sunil sarode
2.5k
views
sunil sarode
asked
Dec 19, 2017
Algorithms
algorithms
logarithmic-function
+
–
1
votes
1
answer
1749
Master Theorem
T(n) = 2T(n/2) + nlogn a. O(nlogn) b.n(log^2n) c.O(n^2)
T(n) = 2T(n/2) + nlogna. O(nlogn)b.n(log^2n)c.O(n^2)
dragonball
580
views
dragonball
asked
Dec 19, 2017
Algorithms
algorithms
master-theorem
time-complexity
+
–
0
votes
0
answers
1750
#Algorithms
On a connected, directed graph with only positive edge weights, Bellman-Ford runs asymptotically as fast as Dijkstra. Explain: Solution: False. Bellman-Ford requires O(V E), regardless of the edge weights. Dijkstra runs in O (E + V lg V ). Because the graph is connected, E = Ω(V ), so O(V E) =Ω (V^2), which is clearly worse than Dijkstra. Here , what is E = Ω(V ) ?
On a connected, directed graph with only positive edge weights, Bellman-Ford runs asymptotically as fast as Dijkstra.Explain:Solution: False. Bellman-Ford requires O(V E)...
Harish Karnam
393
views
Harish Karnam
asked
Dec 18, 2017
Algorithms
algorithms
graphalgorithms
+
–
0
votes
0
answers
1751
Question
Insert these element in avl tree 15,20,24,10,13,7,30,36,25 And then delete 24,20 Please explain step by step I am confuse
Insert these element in avl tree15,20,24,10,13,7,30,36,25And then delete 24,20Please explain step by stepI am confuse
nikkey123
1.5k
views
nikkey123
asked
Dec 18, 2017
Programming in C
algorithms
+
–
2
votes
1
answer
1752
Which function has asymptotically larger growth rate n^{logn} or logn^{n}
Durgesh Singh
974
views
Durgesh Singh
asked
Dec 18, 2017
Algorithms
recurrence-relation
asymptotic-notation
algorithms
+
–
4
votes
1
answer
1753
ISRO-DEC2017-20
Match the following and choose the correct answer for the order $A,B,C,D$ ... -s, c-p, d-q a-r, b-p, c-s, d-q a-q, b-s, c-p, d-r a-s, b-p, c-q, d-r
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.} & ...
gatecse
1.7k
views
gatecse
asked
Dec 17, 2017
Algorithms
isrodec2017
algorithms
+
–
0
votes
1
answer
1754
Minimum number of comparisons required in optimal algorithm
Rajesh R
620
views
Rajesh R
asked
Dec 17, 2017
Programming in C
algorithms
+
–
2
votes
0
answers
1755
Please solve this Q
kallu singh
338
views
kallu singh
asked
Dec 16, 2017
Algorithms
algorithms
+
–
2
votes
1
answer
1756
shortest path
Read the following statements below For all the below questions consider the graph as simple and has positive weight edges. (i) Let the cost of the shortest path between two nodes is S.If the weight of every edge in the graph is doubled then weight of the ... We can use Kruskal's algorithm to find Minimum spanning tree of a directed graph . How many of the above statements are true.
Read the following statements belowFor all the below questions consider the graph as simple and has positive weight edges.(i) Let the cost of the shortest path between tw...
VIKAS TIWARI
1.0k
views
VIKAS TIWARI
asked
Dec 13, 2017
Algorithms
algorithms
shortest-path
graph-algorithms
+
–
0
votes
0
answers
1757
General Topic Doubt: Algorithms - Dynamic Programming
Read the following statements about 0/1 Knapsack problem. (i) Time complexity of Knapsack is O(n* W) where W is the weight of the Knapsack and there are n items. (ii) Time complexity of Knapsack is min( O(n*W) , O(2^n) ) where W is the weight of the ... ) and (iii) is true (ii) and (iii) is true (i) ( iii) (iv) is true (ii) (iii) (iv) is true.
Read the following statements about 0/1 Knapsack problem.(i) Time complexity of Knapsack is O(n* W) where W is the weight of the Knapsack and there are n items.(ii) Time ...
VIKAS TIWARI
1.1k
views
VIKAS TIWARI
asked
Dec 13, 2017
Algorithms
algorithms
dynamic-programming
knapsack-problem
general-topic-doubt
+
–
1
votes
1
answer
1758
Greedy vs Dynamic
Unlike greedy algorithms, dynamic programming method always provide correct/optimal solution. Is the above statement correct?
Unlike greedy algorithms, dynamic programming method always provide correct/optimal solution.Is the above statement correct?
Tuhin Dutta
6.3k
views
Tuhin Dutta
asked
Dec 13, 2017
Algorithms
algorithms
greedy-algorithm
dynamic-programming
+
–
2
votes
1
answer
1759
Minimum Spanning tree
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 weights are increased by 2, then the cost of the new MST is
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...
VIKAS TIWARI
1.7k
views
VIKAS TIWARI
asked
Dec 13, 2017
Algorithms
algorithms
minimum-spanning-tree
+
–
1
votes
1
answer
1760
Find the element that appears once in a sorted array.
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?
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?
Tuhin Dutta
1.3k
views
Tuhin Dutta
asked
Dec 13, 2017
Algorithms
algorithms
sorting
+
–
0
votes
1
answer
1761
Bellman Ford algorithm
Consider the statements True/ False Bellman Ford algorithm reports a shortest path from source to a destination only in a directed graph which has a negative cycle.
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.
VIKAS TIWARI
1.4k
views
VIKAS TIWARI
asked
Dec 13, 2017
Algorithms
algorithms
bellman-ford
true-false
+
–
2
votes
1
answer
1762
Optimal Merge Pattern
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.
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.
VIKAS TIWARI
3.9k
views
VIKAS TIWARI
asked
Dec 13, 2017
Algorithms
merging
algorithms
+
–
0
votes
1
answer
1763
Asymtotic notations
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) $
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) $
Tuhin Dutta
728
views
Tuhin Dutta
asked
Dec 12, 2017
Algorithms
algorithms
asymptotic-notation
time-complexity
+
–
0
votes
0
answers
1764
BFS traversal sequence
Starting vertex is : $V_1$ Find the BFS traversal sequence
Starting vertex is : $V_1$Find the BFS traversal sequence
Tuhin Dutta
373
views
Tuhin Dutta
asked
Dec 12, 2017
Algorithms
algorithms
breadth-first-search
graph-algorithms
data-structures
+
–
0
votes
1
answer
1765
more than n/2
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is Θ(n) Θ(logn) Θ(log∗n) Θ(1) isnt O(1) enough for this.....the answer give in this site is log N can i get a counter on why O(1) wont work ?
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers isΘ(n)Θ(logn)Θ(log∗n)Θ(1)isnt O(1)...
A_i_$_h
3.4k
views
A_i_$_h
asked
Dec 11, 2017
Algorithms
algorithms
sorting
time-complexity
+
–
5
votes
3
answers
1766
Shortest path - bellman ford and floyd warshall
Consider the following statements with respect to a directed graph G in which edges can have positive or negative edge length but that has no negative cycles: S1 : The Bellman-Ford algorithm correctly computes shortest path ... Floyd-Warshall algorithm correctly computes shortest path lengths between every pair of vertices. Which of them is correct?
Consider the following statements with respect to a directed graph G in which edges can have positive or negative edge length but that has no negative cycles:S1 : The Be...
Tuhin Dutta
3.2k
views
Tuhin Dutta
asked
Dec 10, 2017
Algorithms
algorithms
shortest-path
+
–
2
votes
2
answers
1767
Matrix Multiplications
Let $A1, A2, A3, A4, A5$ be five matrices of dimensions $2\times3, 3\times5, 5\times2, 2\times4, 4\times3$ respectively. The minimum number of scalar multiplications required to find the product $A1, A2 ,A3, A4, A5$ using the basic matrix multiplication method is_______
Let $A1, A2, A3, A4, A5$ be five matrices of dimensions $2\times3, 3\times5, 5\times2, 2\times4, 4\times3$ respectively. The minimum number of scalar multiplications requ...
Parshu gate
3.2k
views
Parshu gate
asked
Dec 10, 2017
Algorithms
matrix-chain-ordering
dynamic-programming
algorithms
+
–
13
votes
1
answer
1768
TIFR CSE 2018 | Part B | Question: 7
Consider the recursive quicksort algorithm with "random pivoting". That is, in each recursive call, a pivot is chosen uniformly at random from the sub-array being sorted.When this randomized algorithm is applied to an array of size $n$ all whose elements are distinct, ... $\Theta\left(\dfrac{1}{n \log^{2} n}\right)$
Consider the recursive quicksort algorithm with "random pivoting". That is, in each recursive call, a pivot is chosen uniformly at random from the sub-array being sorted....
Arjun
8.3k
views
Arjun
asked
Dec 10, 2017
Algorithms
tifr2018
algorithms
sorting
quick-sort
+
–
9
votes
2
answers
1769
TIFR CSE 2018 | Part B | Question: 3
How many distinct minimum weight spanning trees does the following undirected, weighted graph have ? $1$ $2$ $4$ $6$ $8$
How many distinct minimum weight spanning trees does the following undirected, weighted graph have ?$1$$2$$4$$6$$8$
Arjun
2.6k
views
Arjun
asked
Dec 10, 2017
Algorithms
tifr2018
algorithms
minimum-spanning-tree
+
–
22
votes
3
answers
1770
TIFR CSE 2018 | Part A | Question: 3
Which of the following statements is TRUE for all sufficiently large integers n ? $2^{2^{\sqrt{\log \log n}}} <2^{\sqrt{\log n}} < n$ $2^{\sqrt{\log n}}<n<2^{2^{\sqrt{\log \log n}}}$ $n<2^{\sqrt{\log n}}<2^{2^{\sqrt{\log \log n}}}$ $n<2^{2^{\sqrt{\log \log n}}} <2^{\sqrt{\log n}}$ $2^{\sqrt{\log n}}<2^{2^{\sqrt{\log \log n}}} < n$
Which of the following statements is TRUE for all sufficiently large integers n ?$2^{2^{\sqrt{\log \log n}}} <2^{\sqrt{\log n}} < n$$2^{\sqrt{\log n}}<n<2^{2^{\sqrt{\log ...
Arjun
3.0k
views
Arjun
asked
Dec 10, 2017
Algorithms
tifr2018
algorithms
asymptotic-notation
+
–
Page:
« prev
1
...
54
55
56
57
58
59
60
61
62
63
64
...
118
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register