# Graph and Heap Data Structure MCQs

- What data structure is used for depth first traversal of a graph?
- Graph traversal is different froma tree traversal, because:
- Graphs are represented using ____________.
- Which of the following is true?
- Prim’s & Kruskal algorithm are ________.
- What is the time complexity of Kruskal’s algorithm?
- What is an AVL tree?
- Why to prefer AVL trees?*
- In a max-heap, element with the greatest key is always in the which node?
- Heap Data Structure can be used as _______.
- Depth First Search is equivalent to which of the traversal in the Binary Trees?
- Time Complexity of Breadth First Search is? (V – number of vertices, E – number of edges)
- Symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier (or symbol) in a program’s source code is associated with information relating to its declaration or appearance in the source.
- heap can be used as
- what is the complexity of adding an element to the heap _______.
- In a max-heap, element with the greatest key is always in the which node?
- what is the complexity of adding an element to the heap
- the worst case complexity of deleting any arbitrary node value element from heap is
- A connected planar graph having 6 vertices, 7 edges contains _____________ regions.
- Which of the following properties does a simple graph not hold?
- For a given graph G having v vertices and e edges which is connected and has no cycles, which of the following statements is true?
- A graph with all vertices having equal degree is known as a __________.
- Which of the following statements for a simple graph is correct?
- What is the number of edges present in a complete graph having n vertices?

(a) Queue

(b) Stack

(c) List

(d) Tree

(b) Stack

(a) Trees are not connected

(b) Graphs may have loops

(c) Trees have root

(d) None of these

(c) Trees have root

(a) Adjacency tree

(b) Adjacency linked list and Matrices

(c) Both a and b

(d) Adjacency queue

(c) Both a and b

(a) Prim’s algorithm initialises with a vertex

(b) Prim’s algorithm initialises with a edge

(c) Prim’s algorithm initialises with a vertex which has smallest edge

(d) Prim’s algorithm initialises with a forest

(a) Prim’s algorithm initialises with a vertex

(a) Divide and conquer algorithm

(b) Greedy algorithm

(c) Dynamic Programming

(d) Approximation algorithm

(b) Greedy algorithm

(a) O(log V)

(b) O(E log V)

(c) O(E2)

(d) O(V log E)

(b) O(E log V)

(a) a tree which is balanced and is a height balanced tree

(b) a tree which is unbalanced and is a height balanced tree

(c) a tree with three children

(d) a tree with atmost 3 children

(a) a tree which is balanced and is a height balanced tree

(a) AVL Tree is easiest to implement.

(b) AVL tree store balance factor in every node which costs space

(c) AVL tree fails at scale

(d) AVL Tree is not efficient

(b) AVL tree store balance factor in every node which costs space

(a) Leaf node

(b) First node of left sub tree

(c) Root node

(d) First node of right sub tree

(c) Root node

(a) Priority queue

(b) Stack

(c) A decreasing order array

(d) Normal Array

(a) Priority queue

(a) Pre-order Traversal

(b) Post-order Traversal

(c) Level-order Traversal

(d) In-order Traversal

(a) Pre-order Traversal

(a) O(V+E)

(b) o(v)

(c) o(E)

(d) None of the mentioned

(a) O(V+E)

(a) True

(b) False

(a) True

(a) Priority queue

(b) Stack

(c) A decreasing order array

(d) Normal Array

(a) Priority queue

(a) O(log n)

(b) O(log h)

(c) O(h)

(d) Both A and C

(d) Both A and C

(a) Leaf node

(b) First node of left sub tree

(c) Root node

(d) First node of right sub tree

(c) Root node

(a) O(log n)

(b) O(nlog n)

(c) nlog

(d) logn

(a) O(log n)

(a) O(logn)

(b) O(n)

(c) O(nlogn)

(d) O(n^2)

(a) O(logn)

(a) 15

(b) 3

(c) 1

(d) 11

(b) 3

(a) Must be connected

(b) Must be unweighted

(c) Must have no loops or multiple edges

(d) Must have no multiple edges

(a) Must be connected

(a) v=e

(b) v = e+1

(c) v + 1 = e

(d) v = e-1

(b) v = e+1

(a) Multi Graph

(b) Regular Graph

(c) Simple Graph

(d) Complete Graph

(b) Regular Graph

(a) Every path is a trail

(b) Every trail is a path

(c) Every trail is a path as well as every path is a trail

(d) Path and trail have no relation

(a) Every path is a trail

(a) (n (n+1)/2

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

(c) r

(d) Information given is insufficient

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

##### Related Topics

“**Graph and Heap Data Structure MCQs**“,”graph data structure mcqs”,”heap data structure mcqs”,”mcq on data structure with answers pdf”,”data structure multiple choice questions and answers doc”,”mcq on graph in dsa”,”Heap Data Structure”,”heap data structure mcqs”