Table of Contents

## Graph Algorithms Solved MCQs With Answers

1. How many vertices are there in a complete graph with n vertices?

a) (n*(n-1))/2

b) (n*(n+1))/2

c) n+1

d) none of these

2. We use Dijkstra’s Algorithm to …

a) non-weighted non-negative

b) weigthed non-negative

c) weighted positive

d) non-weighted positve

3. What is the result if total time is bound of in prim’s algorithm?

a) O(m+n logn)

b) O(m logn)

c) O(nlogn)

d) none of these

4. What will be the sum of degrees of each vertices for undirected graph G if it has n vertices and e edges?

a) 2e

b) 2ne

c) ne

d) none of these

5. Which data structure will be used for implementing dijkstra’s shortest path algorithm on unweighted graph in a way that it also run linearly?

a) tree

b) queue

c) stack

d) heap

6. In queue which method is applied for storing data?

a) LIFO

b) FIFO

c) both

d) none of these

7. We use a circular linked list for stack as well as for …

a) binary tree

b) queue

c) heap

d) array

8. What is the minimum number of spanning tree in a connected graph?

a) 1

b) 2

c) 3

d) none of these

9. How quick sort partition an array ?

a) double element

b) pivot element

c) couple element

d) none of these

10. Why graph traversal is difficult than tree traversal ?

a) because tree have root

b) because tree is binary

c) because tree is undefined

d) all of these

11. Which of the following means computing the reachibility of all the vertices?

a) transitive hull

b) safest path

c) minimum distance

d) maximum distance

12. An un weighted, connected or disconnected is a ____

a) weighted graph

b) unweighted graph

c) simple graph

d) none of these