Computer Science · Graph Algorithms
Let G be a graph with n vertices and m edges. What is the tightest upper bound on the running time of Depth First Search (DFS) on G, when G is represented as an adjacency matrix?
- 1Θ(m2)
- 2Θ(n2)✓
- 3Θ(n + m)
- 4Θ(n)
Correct answer
Θ(n2)
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Graph Algorithms?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Graph Algorithms