12,612 views
0 votes
0 votes
Which data structure is used in breadth first search of a graph to store nodes ?

1)Array

2)Stack

3)Queue

4)Tree

1 Answer

Best answer
5 votes
5 votes

we use queue in BFS

and stack in DFS

selected by

Related questions

0 votes
0 votes
1 answer
1
Mayurk asked Feb 3, 2016
1,021 views
2 votes
2 votes
1 answer
2
radha gogia asked Dec 10, 2015
1,639 views
If I have n elements in the heap then why does the index of leaf nodes ranges from index ⌊n/2⌋+1 to index n ?
0 votes
0 votes
1 answer
3
Sanjay Sharma asked Apr 13, 2016
4,958 views
The bus which is used to transfer data from main memory to peripheral device isa) data busb) input busc) DMA busd) output bus
0 votes
0 votes
3 answers
4
Desert_Warrior asked Apr 11, 2016
5,322 views
Consider a situation where a client receives packets from a server. There may be differences in speed of the client and the server. Which data structure is best suited fo...