Data Structure and Algo Questions

This Test will cover basic concepts of data Structure and related algorithm.

Q. What is the total number of swaps required to create max heap using the following array?
31 14 19 29 11 24 15
Q. What is the minimum number of bits required to represent alphabet 'f' using huffman's encoding?
Alphabet A b C d e F g
Frequency 50 40 30 20 10 5 0
Q. We use dynamic programming approach when:

Q. What is the length of longest common sub-sequence in the following string set?

X = 'PQRQSPQ'
Y = 'QSRPQP'
Q. Which of the following problems require dynamic programming paradigm?
Q. Which of the following statements are necessarily true?
(I) Dijkastra's algorithm for single source shortest path can be used for negative weight cycle.
(II) Dijkastra's algorithm for non negative weight cycle is better than bellman ford algorithm.
(III) Dijkastra's algorithm is also applicable for all pair shortest path also .
(IV) Bellman ford algorithm can be used for all pair shortest path.
Q. Which of the following is NOT the typical application of Stack?
Q. What is the worst case time complexity for searching, insertion and deletion operations in a Binary Search Tree?

Q. Which of the following pair of traversals are self sufficient to draw unique binary tree?
Q. Which of the following traversal will provide sorted list of elements present in binary search tree?
Q. What is the value of the below post fix notation ?

512+4x+2

Q. What is the time complexity of Breadth first traversal using Breadth first search algorithm for a graph having more than one connected components?

Q. Consider three matrices A,B and C which are compatible for matrix multiplication in the order 'ABC'.
Then in how many ways we can perform matrix multiplication?
Q. Consider three matrices A [2 X 1] , B[1 X 2] and C[2 X 4].
What is the minimum number of multiplications required for matrix multiplication of the matrices in the order 'ABC'?
Q. Which of the following algorithm is self sufficient to implement dijkastra's algorithm for single source shortest path for non-weighted graph?

SUBMIT TEST