Which traversal technique visits all the vertices of a graph without going back?
Question and options
Which traversal technique visits all the vertices of a graph without going back?
- Depth-First Search (DFS)
- Breadth-First Search (BFS)
- Inorder Traversal
- Preorder Traversal
Answer and explanation
Correct answer: B - Breadth-First Search (BFS)
BFS explores level by level from the source using a queue, without backtracking. DFS goes deep and backtracks. Inorder and preorder are tree traversals, not general graph searches.
Practice for these exams
-
CUSAT CAT M.Sc. Forensic Science
-
Uttarakhand Judicial Services
Subject revision
Related question papers
Related exam syllabi
More solved explanations in Computer fundamentals
- In computing, 1 nibble is equal to ?
- Who designed the Analytical Engine, a mechanical general-purpose programmable computing machine?
- Which of the following is not a software ?
- In the central processing unit the memory which used by computer for storing the programmes and their data while working on them. It is possible to use any…
- In Computer CD-RW is-