Hard
What is the function of the following code applied to the graph G?
function browse(Graph G, Vertex s)
{
create_a_queue;
put s at the top of the queue;
label s;
While the queue is not empty
{
remove s from the queue;
For all neighbors v of s in G
{
If v is not labeled
{
put v in the queue;
label v;
}
}
}
}
Author: KahinaStatus: PublishedQuestion passed 143 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
2
What is the complexity of this algorithm?6
What type of structure are the results of a recursive function stored in?7
What is special about quick sort?2
Given an array of 17 elements sorted in ascending order, what is the cost of accessing the element with index 10?9
What is recursion?5
What does the While loop do?2
What about the merge sort method?