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. :
6
Question :
The infix expression A+(B-C)*D is correctly represented in prefix notation as
A _______ is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.
A :
queue linked list
B :
stacks linked list
C :
both of them
D :
neither of them
Answer: A
Q. No. :
15
Question :
Which of the following list of nodes corresponds to a post order traversal of the binary tree shown :
A :
A B C D E F G H I J
B :
A B C D E H C F I J
C :
D H E B I F J G C A
D :
D B E H A I F C J G
Answer: C
Q. No. :
16
Question :
The Worst case occur in linear search algorithm when
A :
Item is somewhere in the middle of the array
B :
Item is not in the array at all
C :
Item is the last element in the array
D :
Item is the last element in the array or is not there at all
Answer: D
Q. No. :
17
Question :
Give the correct matching for the following pair
(A) O(log n)
(P) Selection
(B) O(n)
(Q) Insertion sort
(C) O(n log n)
(R) Binary Search
(D) O(n2)
(S) Merge sort
A :
A-R, B-P, C-Q, D-S
B :
A-R, B-P, C-S, D-Q
C :
A-P, B-R, C-S, D-Q
D :
A-P, B-S, C-R, D-Q
Answer: B
Q. No. :
18
Question :
Which of the following statement is false?
A :
Arrays are dense lists and static data structure
B :
data elements in linked list need not be stored in adjecent space in memory
C :
pointers store the next data element of a list
D :
linked lists are collection of the nodes that contain information part and next pointer
Answer: C
Q. No. :
19
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. :
20
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: