July 17, 2021 in C and CPP
The smallest number of keys that will force a B- tree of order 3 have a height 3 is:
1.7 The smallest number of keys that will force a B- tree of order 3 have a height 3 is:
A) 12
B) 10
C) 7
D) None of the above
July 17, 2021 in C and CPP
1.7 The smallest number of keys that will force a B- tree of order 3 have a height 3 is:
A) 12
B) 10
C) 7
D) None of the above
July 17, 2021 in C and CPP
1.6 The time complexity of the Depth First Search algorithm to traverse a graph of “n” vertices and “e” edges is:
A) O (n) if the graph is represented by adjacency matrix.
B) O (n) if the graph is represented by adjacency list.
C) O (e) if the graph is represented by adjacency list.
D) None of the above
July 17, 2021 in C and CPP
1.5 If j=2, m=1, x=3, y=4. What is the value of the expression j++ = = m = = y * x
A) 0
B) 1
C) 2
D) 3
July 17, 2021 in C and CPP
1.4 Which of the following types of expressions does not require precedence rules for evaluation?
A) Fully parenthesized infix expression
B) Partially parenthesized infix expression
C) Both A) and B)
D) Prefix expression
July 17, 2021 in C and CPP
1.3 Which of the following data structure may give overflow error, even though the current number
of elements in it, is less than its size
A) simple queue
B) circular queue
C) stack
D) none of the above
July 17, 2021 in C and CPP
1.2 Adjacency matrix for a digraph is
A) unit matrix
B) symmetric
C) asymmetric matrix
D) none of the above
July 17, 2021 in C and CPP
1.1 f(n) is of the order of g(n) if there exist positive integers “a” and “b” such that
A) f(n) <= a * g(n) for all n >= b
B) f(n) <= a * g(n) for all n <= b
C) g(n) <= a * f(n) for all n >= b
D) None of the above
July 17, 2021 in C and CPP
c) What is the running time of heap sort on an array A of length n that is already sorted in increasing order?
July 17, 2021 in C and CPP
b) Suppose that the graph G = (V,E) is represented as an adjacency matrix. Give a simple
implementation of Prim’s algorithm for this case that runs in O(V2) time.
July 17, 2021 in C and CPP
a) Suppose that a Graph G has a minimum spanning tree already computed. How quickly can
the minimum spanning tree be updated if a new vertex and incident edges are added to G?