Question 35Asked in Bihar STET 2025 Paper II Computer Science, 7 Nov 2025, Shift 1 (9:00 AM)

Connected components in a graph can be found using which graph traversalएक ग्राफ में जुड़े घटकों को किस ग्राफ ट्रैवर्सल एल्गोरिथ्म का उपयोग करके पाया जा सकता है?

Connected components in a graph can be found using which graph traversal algorithm?
एक ग्राफ में जुड़े घटकों को किस ग्राफ ट्रैवर्सल एल्गोरिथ्म का उपयोग करके पाया जा सकता है?
  1. ADFSडीएफएस
  2. BBFSबीएफएस
  3. CBoth DFS and BFSदोनों डीएफएस और बीएफएस
  4. DNeither DFS nor BFSन तो डीएफएस और न ही बीएफएस
Show answerHide answer

Correct answer: (A) DFSडीएफएस

Explanation

Note: the answer key gives (A), but BFS finds connected components just as well as DFS: each traversal started from an unvisited vertex marks exactly one component. So (C) is the more accurate answer.नोट: आधिकारिक उत्तर कुंजी (A) देती है, लेकिन BFS connected component उतनी ही अच्छी तरह खोजता है जितना DFS: अनदेखे शीर्ष से शुरू हर traversal ठीक एक component चिह्नित करता है। इसलिए (C) अधिक सटीक उत्तर है।

From Bihar STET 2025 Paper II Computer Science PYQ, 7 Nov 2025, Shift 1 (9:00 AM)

This is question 35 of Bihar STET 2025 Paper II Computer Science PYQ, 7 Nov 2025, Shift 1 (9:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.