Data Structures and Algorithms MCQ - Graph Algorithm

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.

Since d(q) = d(p) + 1 and F(q) < f(P) which means p & q are connected and r is sperate so option (d) is correct answer.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
Found this useful?
Follow:


Suppose v is starting vertex so start DFS at node v
(i) visit t (v) → DFS(A) → visit (A) → DFS (v) → visit (u) → back track (A) → Back track (v)
therefore d[v] > d[v], d[v] < f[v] f[v] < f[v]
But visiting order is just opposite of finishing order.
Hence f[v] > f[v]
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.

a b e f d g c, a b e f c g d, a d g e b c f are possible dFs traverse of given graph.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

DFS visits each vertex once and as it visits each vertex, we need to find all of its neighbours to figure out where to search next. Finding all its neighbour s in an adjacency matrix r equires O(V) time, so overall the running time will be O(V2).
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption A
Rate difficulty Rate difficulty:
Choose a difficulty.


Maximum DFS recurside depth is 19
A → B → C → D → E → F → G → H → I → J → K
→ L → M → N → O → P → Q → R → S
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Why Practice with Avatto?
High Quality MCQsExam-focused questions with accurate answers
Detailed ExplanationsStep-by-step explanations to enhance learning
Latest Exam PatternBased on updated syllabus and pattern
Performance AnalyticsTrack performance and improve weak areas
100% Free PracticePractice unlimited questions for free