New Tutorials: # Data Structure and Algo Questions

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

Q. How many queues are needed to implement priority queues?
 A. 3 B. 2 C. 4 D. 5
Q. Which of the following sorting algorithm has least best case time complexity?
 A. Radix sort B. Insertion sort C. Quick sort D. Shell sort
Q. The small o notation in asymptotic evaluation represents?
 A. Average case B. loose lower bound C. loose upper bound D. tight lower bound

Q. There are K nodes in a binary search tree. What will be the maximum number of edges in this tree?
 A. K B. K+1 C. 2K-1 D. K-1
Q. Which of the following condition represents Overflow for a queue?
 A. Front = Rear B. Front = Rear -1 C. Front =Rear + 1 D. Rear = Front +1
Q. Which of the following is a non-linear data structure?
 A. linked list B. Array C. Graph D. None of these
Q. Which of the following problems can not be implemented by a stack?
\
 A. Creation of process mix by long term scheduler B. Balancing parenthesis C. Evaluation of post fix notation D. Infix to postfix conversion
Q. Quick sort uses which of the following paradigm?
 A. Greedy B. Dynamic programming C. Back tracking D. Divide & conquer

Q. What is the result of following postfix expression?

2 4 1 * - 3 -

 A. -2 B. -1 C. -5 D. 4
Q. Evaluate the following postfix expression?

3 9 + 6 4 / * 3 5 * *

 A. 160 B. 180 C. 190 D. 200
Q. What will be time complexity of selection sort when the elements are arranged in reverse sorted manner?
 A. O(n) B. O(nlog n) C. O(n2) D. O(1)
Q. Which sorting algorithm is best suited when elements are present in increasing order?
 A. Selection Sort B. Merge sort C. Heap sort D. Insertion sort

Q. Which data structure is best suited for implementing huffman's encoding algorithm?
 A. Array B. Linked List C. Graphs D. Heaps
Q. In quick sort algorithm what is the time complexity of partition function when last element is selected as pivot element?
 A. O(n) B. O(log n) C. O(n log n) D. O(n2)
Q. Which of the following is out of place sorting algorithm?
 A. Insertion sort B. Bubble sort C. Selection sort D. Merge sort