Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
1
votes
0
answers
1471
Ace Test Series: Algorithm - Merge Sort
Shankar Kakde
648
views
Shankar Kakde
asked
Jun 11, 2018
Algorithms
ace-test-series
algorithms
merge-sort
+
–
0
votes
3
answers
1472
Time Complexity
What is the time complexity of the following code? for(i=n;i>=1;) i=i/2;
What is the time complexity of the following code?for(i=n;i>=1;)i=i/2;
Devshree Dubey
404
views
Devshree Dubey
asked
Jun 10, 2018
Algorithms
algorithms
time-complexity
+
–
0
votes
1
answer
1473
Recurrence Relation
How to solve using recursion tree method T(n) = T(n/2) + c ; n > 1 T(n) = C ; n = 1
How to solve using recursion tree methodT(n) = T(n/2) + c ; n 1T(n) = C ; n = 1
Lakshman Bhaiya
366
views
Lakshman Bhaiya
asked
Jun 10, 2018
Algorithms
algorithms
recurrence-relation
+
–
0
votes
1
answer
1474
Uninitialized array with garbage value.
Array follows static memory allocation then why it gives garbage value in case of uninitialized array .and it gives zero when the array is partially initialized?
Array follows static memory allocation then why it gives garbage value in case of uninitialized array .and it gives zero when the array is partially initialized?
Priyankamishra
3.9k
views
Priyankamishra
asked
Jun 10, 2018
Programming in C
programming-in-c
algorithms
+
–
0
votes
1
answer
1475
Self-Doubt
Phlegmatic
204
views
Phlegmatic
asked
Jun 9, 2018
Algorithms
algorithms
asymptotic-notation
test-series
+
–
0
votes
1
answer
1476
True/False
Which of the following statements related to graphs are True? Consider a graph with Positive distinct edges 1.If we add a Positive Integer to all edges, then there are chances to get more than one shortest paths between 2 vertices 2.If we add a Positive Integer ... 4.If we add a Negative Integer to all edges, then there are chances to get more than one longest paths between 2 vertices
Which of the following statements related to graphs are True?Consider a graph with Positive distinct edges1.If we add a Positive Integer to all edges, then there are chan...
Balaji Jegan
718
views
Balaji Jegan
asked
Jun 9, 2018
Graph Theory
algorithms
graph-theory
dijkstras-algorithm
+
–
0
votes
0
answers
1477
randome question
Q1 . Let G be a connected planner graph with 10 vertices.if the number of edges on each face is three then the number of edges in graph G is _____ A 24 B.20 C.32 D.64 Q2. Let "a(n)" represent the number of bits of length n containing two consecutive 1s what is the recurrence relation of ... C. 2a(n-2) + a(n-1) + 2^n-2 D. 2a(n-2) + 2a(n-1) + 2^n-2 Q2 i am getting Option A
Q1 . Let G be a connected planner graph with 10 vertices.if the number of edges on each face is three then the number of edges in graph G is _____A 24 B.20 C.32 ...
Prateek kumar
244
views
Prateek kumar
asked
Jun 9, 2018
Algorithms
discrete-mathematics
algorithms
+
–
1
votes
2
answers
1478
Self-Doubt
What will be the solution of the following recurrence? $T(n)=3T\sqrt{n}+\log(n)$
What will be the solution of the following recurrence?$$T(n)=3T\sqrt{n}+\log(n)$$
Phlegmatic
718
views
Phlegmatic
asked
Jun 8, 2018
Algorithms
algorithms
recurrence-relation
+
–
0
votes
3
answers
1479
Self-Doubt
int main() { int i; for(i=1;i<=n;i++) f(i); } void f(int n) { int A[n]; int j; for(j=1;j<=n;j++) cout<<j; } What will be the time and space complexity of the following code snippet ?
int main() { int i; for(i=1;i<=n;i++) f(i); } void f(int n) { int A[n]; int j; for(j=1;j<=n;j++) cout<<j; }What will be the time and space complexity of the following cod...
Phlegmatic
533
views
Phlegmatic
asked
Jun 8, 2018
Algorithms
algorithms
time-complexity
space-complexity
+
–
1
votes
2
answers
1480
Cormen
T(n)=T(n-1)+2n where T(1)=1 Solve recurrence relation
T(n)=T(n-1)+2n where T(1)=1Solve recurrence relation
vijju532
3.3k
views
vijju532
asked
Jun 8, 2018
Algorithms
recurrence-relation
algorithms
time-complexity
+
–
0
votes
0
answers
1481
Gate_2019_Mock_Paper
Please explained in detail hashing question
Please explained in detail hashing question
Harikesh Kumar
285
views
Harikesh Kumar
asked
Jun 7, 2018
Algorithms
algorithms
data-structures
hashing
+
–
0
votes
1
answer
1482
Gate_2019_Mock_Paper
Please explained in detail
Please explained in detail
Harikesh Kumar
443
views
Harikesh Kumar
asked
Jun 7, 2018
Algorithms
algorithms
data-structures
hashing
test-series
+
–
0
votes
0
answers
1483
Complexity
#DAA Prove that if: f(n) = amnm + am-1nm-1 + am-2nm-2 + am-3nm-3 + .........+ a1n + a0 then f(n) = O(nm) .
#DAAProve that if: f(n) = amnm + am-1nm-1 + am-2nm-2 + am-3nm-3 + .........+ a1n + a0 then f(n) = O(nm) .
Naveen Kumar 3
261
views
Naveen Kumar 3
asked
Jun 6, 2018
Algorithms
algorithms
time-complexity
asymptotic-notation
+
–
1
votes
2
answers
1484
Analysis of algorit
Which of the following statements is/are valid? 1. Time Complexity of QuickSort is Θ(n^2) 2. Time Complexity of QuickSort is O(n^2) 3. For any two functions f(n) and g(n), we have f(n) = Θ(g(n)) if and only if f(n) = O(g(n)) and f(n) = Ω(g(n)). 4. Time complexity of all computer algorithms can be written as Ω(1)
Which of the following statements is/are valid?1. Time Complexity of QuickSort is Θ(n^2)2. Time Complexity of QuickSort is O(n^2)3. For any two functions f(n) and g(n), ...
jatinkumar
2.6k
views
jatinkumar
asked
Jun 6, 2018
Algorithms
time-complexity
algorithms
asymptotic-notation
multiple-selects
+
–
1
votes
1
answer
1485
Sorting
Which sorting algorithm is good if we already knew the range of number - Counting Sort OR Radix Sort
Which sorting algorithm is good if we already knew the range of number -Counting Sort OR Radix Sort
jatinkumar
852
views
jatinkumar
asked
Jun 5, 2018
DS
sorting
time-complexity
algorithms
+
–
3
votes
2
answers
1486
#Algorithms Time Complexity Analysis of Multistage Graph using Bottom Up Dynamic Programming
Time complexity of Multistage Graph is O(n2) or O(V2) but then some people says it's O(E). So, from O(V2) to O(E) are they taking about dense/complete graphs in which number of edges |E| = |V2|? Kindly help!
Time complexity of Multistage Graph is O(n2) or O(V2) but then some people says it's O(E). So, from O(V2) to O(E) are they taking about dense/complete graphs in which num...
iarnav
5.3k
views
iarnav
asked
Jun 3, 2018
Algorithms
algorithms
dynamic-programming
+
–
1
votes
1
answer
1487
MadeEasy Test Series: Algorithms - Dynamic Programming
Consider two Person (Person X, Person Y). Person X who was given a problem to calculate A1 A2 A3 with dimension 3 100, 100 2 and 2 2 in minimum multiplication. Person X is the knows only ... Y solved the same problem using Dynamic algorithm with M2multiplications. How many number of multiplications saved by Person Y than Person X?
Consider two Person (Person X, Person Y). Person X who was given a problem to calculate A1 × A2 × A3 with dimension 3 × 100, 100 × 2 and 2 × 2 in minimum multiplicat...
Ayesha_S
920
views
Ayesha_S
asked
Jun 2, 2018
Algorithms
made-easy-test-series
algorithms
dynamic-programming
+
–
0
votes
2
answers
1488
Made easy test
saumya mishra
851
views
saumya mishra
asked
May 30, 2018
Algorithms
algorithms
quick-sort
numerical-answers
made-easy-test-series
+
–
1
votes
1
answer
1489
#Algortihms Gate 2000 Question Self Doubt
Source - Here Let G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let v be the first new (unvisited) vertex visited after visiting u in ... being, since (u,v) is an edge in G therefore they can only be SIBLINGS in DFS tree and never have descendant relationship?
Source - HereLet G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let v be ...
iarnav
910
views
iarnav
asked
May 29, 2018
Algorithms
algorithms
graph-algorithms
usermod
usergate2005
+
–
7
votes
3
answers
1490
Time complexity , Recursion
Why is recursive equation of following code $T(n)=T(n/2)+O(1)$, not $T(n)=8*T(n/2)+O(1)$? int x=0; int A(n) { if(n==1) return 1; else { X+=8A(n/2)+n^3; } return X; }
Why is recursive equation of following code $T(n)=T(n/2)+O(1)$, not $T(n)=8*T(n/2)+O(1)$? int x=0; int A(n) { if(n==1) return 1; else { X+=8A(n/2)+n^3; } return X; }
bts
1.9k
views
bts
asked
May 29, 2018
Algorithms
recursion
time-complexity
algorithms
master-theorem
+
–
5
votes
1
answer
1491
#Algorithms #DFS
Consider the tree arcs of a $DFS$ traversal from a source node $W$ in an unweighted, connected, undirected graph. The tree $T$ formed by the tree arcs is a data structure for computing the shortest path between every pair of vertices. the shortest path from $W$ ... in the graph. the shortest paths from $W$ to only those nodes that are leaves of $T$. the longest path in the graph.
Consider the tree arcs of a $DFS$ traversal from a source node $W$ in an unweighted, connected, undirected graph. The tree $T$ formed by the tree arcs is a data structure...
iarnav
1.1k
views
iarnav
asked
May 28, 2018
Algorithms
algorithms
graph-algorithms
depth-first-search
+
–
0
votes
1
answer
1492
merge sort
Why do we say Merge sort makes good use of locality of reference? and if I have $1 \hspace{0.1cm} billion$ elements and my memory can only store $1 \hspace{0.1cm} million$ elements at a time. How would I use merge sort to sort this?
Why do we say Merge sort makes good use of locality of reference? and if I have $1 \hspace{0.1cm} billion$ elements and my memory can only store $1 \hspace{0.1cm} million...
Kiran Karwa
1.1k
views
Kiran Karwa
asked
May 26, 2018
Algorithms
algorithms
merge-sort
sorting
+
–
5
votes
1
answer
1493
Quick Sort- Algorithm
Let $0<α<.5$ be some constant (independent of the input array length $n$). What is the probability that, with a randomly chosen pivot element, the Partition subroutine produces a split in which the size of the smaller of the two subarrays is $≥α$ times the size of the original array? 1. $1 - 2*\alpha$ 2. $\alpha$ 3. $1 - \alpha$ 4. $2 - 2*\alpha$
Let $0<α<.5$ be some constant (independent of the input array length $n$). What is the probability that, with a randomly chosen pivot element, the Partition subroutine p...
Shailin Shah
1.8k
views
Shailin Shah
asked
May 23, 2018
Algorithms
algorithms
probability
quick-sort
+
–
5
votes
1
answer
1494
#Algorithms Gate 2005 Question Self Doubt.
Source of the question - here A sink in a directed graph is a vertex i such that there is an edge from every vertex $j ≠ i $ to i and there is no edge from i to any other vertex. A directed graph G with n vertices is represented by ... the diagonal elements in adjacency matrix is = 0. You can take a Graph with 4 vertices and make anyone of them as a sink.
Source of the question - hereA sink in a directed graph is a vertex i such that there is an edge from every vertex $j ≠ i $ to i and there is no edge from i to any othe...
iarnav
1.3k
views
iarnav
asked
May 23, 2018
Algorithms
algorithms
graph-algorithms
usergate2005
usermod
+
–
1
votes
1
answer
1495
Dijkstra Time Complexity using Binary Heap
Question Source - https://gateoverflow.in/1374/gate2005-38 Let G(V,E)be an undirected graph with positive edge weights. Dijkstra's single source shortest path algorithm can be implemented using the binary heap data structure with time complexity: 1. O(|V|2) 2. O(| ... as I > said the correct answer is O((|E|+|V|)log|V|). So, where am I going > wrong?
Question Source - https://gateoverflow.in/1374/gate2005-38Let G(V,E)be an undirected graph with positive edge weights. Dijkstra’s single source shortest path algorithm ...
iarnav
2.6k
views
iarnav
asked
May 22, 2018
Algorithms
algorithms
binary-heap
dijkstras-algorithm
time-complexity
+
–
0
votes
2
answers
1496
Finding Kth Smallest Element
Which one of the following is the recurrence equation for the worst case time complexity of finding Kth smallest element in an array of size n' using partition function? Assume c' is constant. A. T(n) = 2T(n/2) + c . n B. T(n) = 2T(n - 1) + c C. (n ... ) + c . n D. T(n) = T(n/2) + c . n Explanation Please and please tell me the different ways we can solve this problem
Which one of the following is the recurrence equation for the worst case time complexity of finding Kth smallest element in an array of size ‘n’ using partition func...
Na462
2.6k
views
Na462
asked
May 20, 2018
Algorithms
algorithms
recurrence-relation
time-complexity
+
–
0
votes
0
answers
1497
Gate 2003 Graph-Algorithms Question Doubt.
You can refer this question here - https://gateoverflow.in/957/gate2003-70. I have tried so much to understand this question, but I'm not getting it, how to take the sample graph and also, how to consider the options! In fact, options ... explanation at all. So, anyone help me get this in a simple layman terms, I'll be very much thankful to them.
You can refer this question here - https://gateoverflow.in/957/gate2003-70.I have tried so much to understand this question, but I'm not getting it, how to take the sampl...
iarnav
519
views
iarnav
asked
May 18, 2018
Algorithms
usergate2003
usermod
algorithms
graph-algorithms
+
–
0
votes
2
answers
1498
#Algorithm Bellman Ford uses which algorithm design technique
Is it Dynamic programming?
Is it Dynamic programming?
iarnav
2.3k
views
iarnav
asked
May 17, 2018
Algorithms
algorithms
bellman-ford
shortest-path
graph-algorithms
+
–
0
votes
1
answer
1499
Finding Min and Max keys
The minimum and maximum number of keys in the internal nodes of B-r with order 4 is: (a) 1, 3 (b) 2, 4 (c) 1, 4 (d) 2, 3
The minimum and maximum number of keys in the internal nodes of B-r with order 4 is:(a) 1, 3(b) 2, 4(c) 1, 4(d) 2, 3
Shumile
355
views
Shumile
asked
May 16, 2018
Programming in C
algorithms
+
–
0
votes
0
answers
1500
Better Algorithm for aggregating data from LDAP Systems
This question is not related to GATE, but certainly would help you to grill your mind to come up with a better approach.. Feel free to comment if you think, this is not a right forum for this question. I have 10 ... format cannot be changed as there is dependency with other downstream systems. Is there a better approach to achieve the same ?
This question is not related to GATE, but certainly would help you to grill your mind to come up with a better approach.. Feel free to comment if you think, this is not a...
Arunav Khare
288
views
Arunav Khare
asked
May 14, 2018
Programming in C
algorithms
searching
+
–
Page:
« prev
1
...
45
46
47
48
49
50
51
52
53
54
55
...
118
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register