Computer Science Illuminated
Computer Science Illuminated
7th Edition
ISBN: 9781284155617
Author: Nell Dale, John Lewis
Publisher: Jones & Bartlett Learning
Question
Book Icon
Chapter 14, Problem 3TQ
Program Plan Intro

Depth-first traversal:

In depth-first search, the graph traversal will be started at the first node and will keep searching until reaching the required node.

  • If the graph contains only one node, then while in the first search itself, the traversal comes to an end.
  • If the graph contains multiple nodes, then it keeps moving into deeper level (i.e. the child node of each node) of the graph until reaching the leaf node.

Breadth-first traversal:

In the breadth-first search, the graph traversal will be started at the first node and will keep searching until reaching the required node.

  • If the graph contains only one node, then while in the first search itself, the traversal comes to an end.
  • If the graph contains multiple nodes, then it traverses all nodes at the first level.

Blurred answer
Students have asked these similar questions
using r language
using r language
using r langauge
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education