Jessicabrut95
Jessicabrut95 Jessicabrut95
  • 11-12-2020
  • Computers and Technology
contestada

Write the pseudocode for depth first search ? (help plz)

Respuesta :

jojomary jojomary
  • 11-12-2020

Answer:

Start by putting any one of the graph's vertices on top of a stack.

Take the top item of the stack and add it to the visited list.

Create a list of that vertex's adjacent nodes. Add the ones which aren't in the visited list to the top of the stack.

Keep repeating steps 2 and 3 until the stack is empty.

Explanation: i hope it help

Answer Link

Otras preguntas

what is the significance of the battle of lade?
8b with explanation please
What “New Deal” agencies still exist today, and how do they assist in the lives of average Americans?
Admission to an amusement park is $10 for children and $15 for adults. On Saturday 1,300 people enter the park and $17,250 is collected. How many children and a
what is hume's fork?
Explain,based on the motion of the gas particles,how the gas is causing the tubes to spin around as shown in the diagram above.
Which number will have the same result when rounded to the nearest ten or hundred A-97 B-118and5 C-179 D-5091
How do I graph inequalities
18x3=54 How do I get a distributive property
Given the function g(x) = -3x + 4, compare and contrast g(-2) and g(4). Choose the statement that is true concerning these two values. A. The value of g(-2) is