Question
An undirected graph has 8 vertices (1 to 8) and the edges 1-2, 2-3, 4-5, 6-7, 7-8 and 6-8. How many connected components does the graph have?
More Data Structure Questions
- In web development and data exchange, what is the fundamental structure used to represent a collection of key-value pairs in a JSON object?
- What will be the output of the following Java snippet? class A { public void display() { System.out.println("Class A"); }} class B ext...
- Best case complexity of insertion sort is:
- The amortized cost of appending an element at the end of a dynamic array is:
- Which graph traversal algorithm is most naturally suited to finding the shortest path between two nodes in an unweighted graph, and what underlying data st...
- For T(n)=2T(n/2)+n, which bound follows from the Master Theorem?
- Which algorithm is used for shortest path in graphs?
- A hash table using open addressing with linear probing has a table size of 13 slots and currently holds 9 elements. What is the current load factor of this...
- What is the tight asymptotic time complexity of building a binary min-heap from an unsorted array of n elements using the standard bottom-up heapify approa...
- In a hash table, what is a 'collision'?
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)