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 128 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
2
What about the merge sort method?5
What does the While loop do?2
What do you call a structure whose data are nodes and linked together by oriented arcs?6
What type of structure are the results of a recursive function stored in?6
What is special about quick sort?9
What is recursion?2
Given an array of 17 elements sorted in ascending order, what is the cost of accessing the element with index 10?