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

Angel is 35 years old. She has $550 in a checking account, $6,500 in investments, $15,000 in a retirement account, and owns a house worth $30,000. What is the t
Which religion centered on the prophet muhammed and his interpretation of god's laws? the u.s. and the middle east: select the best answer from the choices prov
Most of the population in England migrated to cities in the late eighteenth century because of better _______.
Solve the quadratic equation. (x + 3)2 = 64 A) x = 5 or -11 B) x = 11 or -5 C) x = ± 3 D) x = ± 11
The answer to the wuestikn
What is the name of this molecule? A. 3-butyne B. 1-butyne C. 2-butyne D. 4-butyne
make x the subject of the formula y=3x-5
9x - 3y = -2 -3x + y = -3
which one of the great lakes does not share a border with Canada
Meaning of apolitical