Which of the following is useful in implementing quick sort
A :
Stack
B :
Set
C :
List
D :
Queue
Answer: A
Q. No. :
20
Question :
A fully binary tree with n non-leaf nodes contains
A :
logn nodes
B :
n+1 nodes
C :
2n nodes
D :
2n+1 nodes
Answer: D
Q. No. :
21
Question :
The postfix expression for the infix expression A+B*(C+D)/F+D*E is
A :
AB+CD+*F/D+E*
B :
ABCD+*F/+DE*+
C :
A*B+CD/F*DE++
D :
A+*BCD/F*DE++
Answer: B
Q. No. :
22
Question :
Arrays are best data structures
A :
for relatively permanent collections of data
B :
for the size of the structure and the data in the structure are constantly changing
C :
for both of above situation
D :
or none of above situation
Answer: A
Q. No. :
23
Question :
A sort which iteratively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
A :
Selection Sort
B :
Insertion Sort
C :
Heap Sort
D :
Quick Sort
Answer: B
Q. No. :
24
Question :
A full binary Tree with N leaves will contain
A :
N nodes
B :
logN nodes
C :
2n-1 nodes
D :
2n nodes
Answer: C
Q. No. :
25
Question :
You are asked to sort 15 numbers randomly. You should prefer
A :
Bubble sort
B :
Quick sort
C :
Merge sort
D :
Heap sort
Answer: C
Q. No. :
26
Question :
The five item A,B,C,D and E are pushed in a stack, one after another starting from A. The stack is popped four times and each element is inserted in a queue. The two elements are deleted from the queue and pushed back on stack. Now one item is popped from stack. The popped item is: