Graph Algorithms Solved MCQs With Answers

By Prof. Fazal Rehman Shamil
Last modified on September 12th, 2020

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

Answer - Click Here:
A

2. We use Dijkstra’s Algorithm to …

a) non-weighted non-negative

b) weigthed non-negative

c) weighted positive 

d) non-weighted positve

Answer - Click Here:
C

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

Answer - Click Here:
A

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

Answer - Click Here:
A

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

Answer - Click Here:
B

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

a) LIFO

b) FIFO

c) both

d) none of these

Answer - Click Here:
B

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

a) binary tree

b) queue

c) heap

d) array

Answer - Click Here:
B

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

a) 1

b) 2

c) 3

d) none of these

Answer - Click Here:
A

9. How quick sort partition an array ?

a) double element

b) pivot element

c) couple element

d) none of these

Answer - Click Here:
B

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

Answer - Click Here:
A

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

Answer - Click Here:
A

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

a) weighted graph

b) unweighted graph

c) simple graph

d) none of these

Answer - Click Here:
C

Computer Science Repeated MCQs Book Download

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.