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

The compromise of 1850 outlawed the slave trade in
Please help me I have
Which of the following would you NOT want to BOYCOTT? A) a product that is harmful to people B) a charity that helps the homeless C) an Earth Day festival D) a
HELP ASAP Which thesis statement should be included to effectively introduce the clalm? O.A. As brain science continues to research how technology affects peopl
. Joyce and Marianne both earn a combined income of $1,600 a week. Marianne earns $200 more than Joyce. How much income do Joyce and Marianne each earn? ( I nee
1. Express 36 minutes as a fraction of an hour: 36 minutes hour​
Find the length of the side “x” and “y”
14. Do loud sounds travel faster than soft sounds? Why or why not?
Would really appriciate it if someone answered this ill love you forever
the sum of 2 numbers is 19 the differance is 3