Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged breadth-first-search
0
votes
0
answers
31
Data structures
Is there any graph whose number of BFS and DFS traversals are different?If so which graph.
Is there any graph whose number of BFS and DFS traversals are different?If so which graph.
AIkiran01
659
views
AIkiran01
asked
Aug 5, 2018
Programming in C
breadth-first-search
data-structures
+
–
0
votes
0
answers
32
DFS BFS
Please give an example i didn't get it The depth of any DFS tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.
Please give an example i didn't get itThe depth of any DFS tree rooted at a vertex is at least as much as thedepth of any BFS tree rooted at the same vertex.
Rishav Kumar Singh
797
views
Rishav Kumar Singh
asked
Aug 2, 2018
Algorithms
depth-first-search
breadth-first-search
algorithms
+
–
0
votes
2
answers
33
BFS Traversal
How through a BFS we can find graph is connected or disconnected? Plz give some example and explain
How through a BFS we can find graph is connected or disconnected? Plz give some example and explain
srestha
919
views
srestha
asked
Jun 30, 2018
Algorithms
breadth-first-search
algorithms
graph-algorithms
+
–
4
votes
2
answers
34
ISRO2018-33
Which of the following is application of Breath First Search on the graph? Finding diameter of the graph Finding bipartite graph Both (a) and (b) None of the above
Which of the following is application of Breath First Search on the graph?Finding diameter of the graphFinding bipartite graphBoth (a) and (b)None of the above
Arjun
3.9k
views
Arjun
asked
Apr 22, 2018
Algorithms
isro2018
graph-algorithms
breadth-first-search
algorithms
+
–
0
votes
0
answers
35
BFS-Breadth first search
State True or False with explanation The depth of a breadth-first search tree on an undirected graph $G = (V, E)$ from an arbitrary vertex $v \in V$ is the diameter of the graph $G$. (The diameter $d$ of a graph is the smallest $d$ such that every pair of vertices $s$ and $t$ have $\delta(s, t) \leq d$)
State True or False with explanation The depth of a breadth-first search tree on an undirected graph $G = (V, E)$ from an arbitrary vertex $v \in V$ is the diameter of th...
akshat sharma
704
views
akshat sharma
asked
Mar 21, 2018
DS
breadth-first-search
data-structures
+
–
6
votes
1
answer
36
Back edge,tree edge,forward edges in BFS
Consider the following statements: 1. Let T be the DFS tree resulting from DFS traversal on a connected directed graph the root of the tree is an articulation point, iff it has at least two children. 2. When BFS is carried out on a directed ... back edge, or cross edge and not forward edge as in the case of DFS. Find TRUE or FALSE for both the statements
Consider the following statements:1. Let T be the DFS tree resulting from DFS traversal on a connected directed graph the root of the tree is an articulation point, iff i...
MIRIYALA JEEVAN KUMA
13.4k
views
MIRIYALA JEEVAN KUMA
asked
Jan 27, 2018
DS
algorithms
breadth-first-search
depth-first-search
graph-algorithms
programming-in-c
data-structures
+
–
1
votes
1
answer
37
BFS- No of Teversals
How to solve these kind of questions?
How to solve these kind of questions?
Shubham Kumar Gupta
922
views
Shubham Kumar Gupta
asked
Jan 17, 2018
DS
breadth-first-search
algorithms
data-structures
graph-algorithms
+
–
1
votes
0
answers
38
Test Series
consider a graph. Let S is starting point to traverse. At any time instance, what will be the maximum length of the queue if we apply BFS for the above-undirected graph?( Marks: -0.66 ) 5 2 4 3 I think answer should be Option(3) i.e. 4 elements ... Further steps will reduce the length of the queue. So maximum length of the queue at any instance is 4. Please correct me if I am wrong.
consider a graph. Let S is starting point to traverse.At any time instance, what will be the maximum length of the queue if we apply BFS for the above-undirected graph?( ...
ankit_thawal
271
views
ankit_thawal
asked
Jan 13, 2018
Algorithms
breadth-first-search
+
–
2
votes
0
answers
39
NO Of BFS traversal
what is the question asking exactly?
what is the question asking exactly?
gari
637
views
gari
asked
Jan 11, 2018
Programming in C
breadth-first-search
algorithms
graph-algorithms
data-structures
+
–
0
votes
0
answers
40
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
0
answers
41
BFS algorithm
$State \ TRUE \ OR \ FALSE :\\ Given \ an \ undirected \ connected \ graph \ with \ binary \ edge \ weights \ the \\ shortest \ path \ b/w \ any \ two \ nodes \ can \ be \ found \ in \ O(E)?$
$State \ TRUE \ OR \ FALSE :\\ Given \ an \ undirected \ connected \ graph \ with \ binary \ edge \ weights \ the \\ shortest \ path \ b/w \ any \ two \ nodes \ can \ be ...
saxena0612
345
views
saxena0612
asked
Dec 8, 2017
Algorithms
breadth-first-search
algorithms
+
–
0
votes
1
answer
42
Breadth first Search
VS
1.0k
views
VS
asked
Nov 26, 2017
Algorithms
algorithms
breadth-first-search
graph-algorithms
numerical-answers
test-series
+
–
0
votes
1
answer
43
TestSeries
Can Bfs be applied for topological sort?
Can Bfs be applied for topological sort?
shreyansh jain
520
views
shreyansh jain
asked
Nov 16, 2017
Algorithms
algorithms
graph-algorithms
breadth-first-search
test-series
+
–
0
votes
0
answers
44
techtud
Let G is a graph with n vertices and m edges. Consider following statements : i. In DFS traversal, number of tree edges produced is independent of selection of starting vertex. ii. In BFS traversal, number of tree edges produced is independent of selection of starting vertex. iii. ... B) Only statements (ii) and (iii) are correct (C) Statements (ii) and (iv) both are wrong (D) None of these
Let G is a graph with n vertices and m edges. Consider following statements : i. In DFS traversal, number of tree edges produced is independent of selection of starting v...
Manoja Rajalakshmi A
644
views
Manoja Rajalakshmi A
asked
Nov 7, 2017
Computer Networks
computer-networks
depth-first-search
breadth-first-search
+
–
0
votes
1
answer
45
BFS TRAVERSAL
Parshu gate
448
views
Parshu gate
asked
Nov 5, 2017
DS
breadth-first-search
algorithms
graph-algorithms
+
–
2
votes
3
answers
46
breadth first search
The max possible height of BFS tree , if BFS is run on a complete bipartite graph Km,n where m>=1 , n>=1 with starting vertex S is
The max possible height of BFS tree , if BFS is run on a complete bipartite graph Km,n where m>=1 , n>=1 with starting vertex S is
A_i_$_h
2.7k
views
A_i_$_h
asked
Sep 17, 2017
Programming in C
breadth-first-search
bipartite-graph
+
–
3
votes
2
answers
47
Graph_Traversal
Gate Ranker18
660
views
Gate Ranker18
asked
Aug 30, 2017
DS
graph-algorithms
depth-first-search
breadth-first-search
+
–
0
votes
0
answers
48
Algorithm
Beyonder
304
views
Beyonder
asked
Aug 18, 2017
Algorithms
algorithms
dijkstras-algorithm
breadth-first-search
+
–
0
votes
1
answer
49
BFS algorithm simple question
BFS algo is applied on graph as well as Binary tree. So, is it different for both graph and Binary tree? As on youtube some people showing BFS on graph and some on Binary tree. Kindly clarify, thanks!
BFS algo is applied on graph as well as Binary tree. So, is it different for both graph and Binary tree?As on youtube some people showing BFS on graph and some on Binary ...
iarnav
968
views
iarnav
asked
May 29, 2017
Algorithms
algorithms
breadth-first-search
+
–
10
votes
8
answers
50
ISRO2017-17
Which of the following data structure is useful in traversing a given graph by breadth first search? Stack Queue List None of the above
Which of the following data structure is useful in traversing a given graph by breadth first search?StackQueueListNone of the above
Arjun
13.2k
views
Arjun
asked
May 9, 2017
Algorithms
isro2017
data-structures
graph-algorithms
breadth-first-search
easy
+
–
0
votes
1
answer
51
BFS traversal
here S1 ans S2 seems confusing for me can someone help me to varify this answer i think given 3 are true in some case??
here S1 ans S2 seems confusing for me can someone help me to varify this answer i think given 3 are true in some case??
S Ram
229
views
S Ram
asked
Feb 1, 2017
Algorithms
breadth-first-search
test-series
+
–
1
votes
1
answer
52
algo + bfs
thor
316
views
thor
asked
Jan 15, 2017
Algorithms
algorithms
graph-algorithms
breadth-first-search
test-series
+
–
0
votes
1
answer
53
Tree BFS
int func(Node root) { int x = 0; int y = 0; queue Q; Q.push(root); while(!Q.empty()) { Node u = Q.top(); Q.pop(); if(u->left == NULL && u->right == NULL) x++; if(u->left != NULL) { y++; Q.push(u->left); } if(u->right != NULL) { y++; Q.push(u->right); } } return x+y; } Above code segment is executed on the following rooted tree: What will be the output?
int func(Node root) { int x = 0; int y = 0; queue Q; Q.push(root); while(!Q.empty()) { Node u = Q.top(); Q.pop(); if(u->left == NULL && u->right == NULL) x++; if(u->left ...
dd
503
views
dd
asked
Jan 13, 2017
Programming in C
breadth-first-search
programming-in-c
binary-tree
+
–
6
votes
3
answers
54
DS-BFS
a)(d,c) b)(d,b) c)(e,b) d)(e,f)
a)(d,c)b)(d,b)c)(e,b)d)(e,f)
srestha
1.7k
views
srestha
asked
Jan 10, 2017
DS
breadth-first-search
+
–
1
votes
1
answer
55
verify the statment
I.The depth of a breadth-first search tree on an undirected graph G=(V,E) from an arbitrary vertex v∈V is the diameter of the graph G. (The diameter d of a graph is the smallest d such that every pair of vertices s and t have δ(s, t) ≤ d.) please veirfy this statement with explanantion and example
I.The depth of a breadth-first search tree on an undirected graph G=(V,E) from an arbitrary vertex v∈V is the diameter of the graph G. (The diameter d of a graph is the...
Akriti sood
811
views
Akriti sood
asked
Dec 27, 2016
Algorithms
algorithms
graph-algorithms
breadth-first-search
+
–
0
votes
1
answer
56
Programming & DS [BFS Cross Edges]
Please tell what is difference between Back edge and cross edge?
Please tell what is difference between Back edge and cross edge?
rahul sharma 5
904
views
rahul sharma 5
asked
Dec 19, 2016
Programming in C
breadth-first-search
depth-first-search
programming-in-c
output
+
–
2
votes
1
answer
57
introduction to algorithms Thomas H.cormen q.22.2-3
In the qusetion he meant that it can be implemented using two colors by eliminating the Grey color... i think there must be one more check such that if v.pi ==nil if it must be done by two colors...only by ... this can result in insertion of same vertex twice by updating the parent and distance again which was updated initial by source vertex
In the qusetion he meant that it can be implemented using two colors by eliminating the Grey color... i think there must be one more check such that if v.pi ==nil if it m...
Pavan Kumar Munnam
1.3k
views
Pavan Kumar Munnam
asked
Nov 14, 2016
Algorithms
algorithms
graph-algorithms
breadth-first-search
descriptive
+
–
1
votes
1
answer
58
BFS traversal
1.{d,c} 2.{d,b} 3.{e,b} 4.{e,f}
1.{d,c}2.{d,b}3.{e,b}4.{e,f}
vaishali jhalani
710
views
vaishali jhalani
asked
Nov 13, 2016
Programming in C
data-structures
breadth-first-search
+
–
0
votes
1
answer
59
BFS Theory
1. Does space complexity includes both input space and extra space needed for algorithm or only extra space? 2.What will be Space complexity for BFS algorithm with adjacency matrix representation? Please reply with supporting references.
1. Does space complexity includes both input space and extra space needed for algorithm or only extra space?2.What will be Space complexity for BFS algorithm with adjacen...
Shyam Singh 1
771
views
Shyam Singh 1
asked
Oct 12, 2016
Algorithms
space-complexity
breadth-first-search
+
–
0
votes
1
answer
60
cormen Q
What is the running time of BFS if we represent its input graph by an adjacency matrix and modify the algorithm to handle this form of input?
What is the running time of BFS if we represent its input graph by an adjacency matrix and modify the algorithm to handle this form of input?
gautamcse27
1.2k
views
gautamcse27
asked
Sep 3, 2016
Algorithms
algorithms
graph-algorithms
breadth-first-search
+
–
Page:
« prev
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register