Welcome Guest

Data Structure Questions for ARICENT

Q. No. :1
Question :The result of evaluating prefix expression */b+-dacd, where a = 3, b = 6, c = 1, d = 5 is
A :
0
B :
5
C :
10
D :
15
Answer: C
Solution
Q. No. :2
Question :What is the worst case time complexity of Bubble sort
A :
O(1)
B :
O(logn)
C :
O(n)
D :
O(n2)
Answer: D
Q. No. :3
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. :4
Question :The complexity of linear search algorithm is
A :
O(n)
B :
O(log n)
C :
O(n2)
D :
O(n log n)
Answer: A
Q. No. :5
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. :6
Question :The elements of an array are stored successively in memory cells because
A :
by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated
B :
the architecture of computer memory does not allow arrays to store other than serially
C :
both of above
D :
none of above
Answer: A
Q. No. :7
Question :In an array representation of binary tree the right child of root will be at location of
A :
2
B :
5
C :
3
D :
0
Answer: C
Q. No. :8
Question : The total number of comparisons in a bubble sort is
A :
O(n log n)
B :
O(2n)
C :
O(n2)
D :
None of the above
Answer: C
Q. No. :9
Question :Stack cant be used to
A :
Evaluate an arithmetic expression in postfix form
B :
Implement recursion
C :
Convert a given arithmetic expression in infix form to its equivalent post fix form
D :
Allocate resources by the operating system
Answer: D
Solution
Q. No. :10
Question :Which of the following data structure is linear data structure?
A :
Trees
B :
Graphs
C :
Arrays
D :
None of above
Answer: C
Q. No. :11
Question :Linked lists are best suited
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 :
for none of above situation
Answer: B
Q. No. :12
Question :The order of magnitude of the worst case performance of ordered binary tree with N elements is
A :
N logN
B :
N
C :
N2
D :
logN
Answer: B
Q. No. :13
Question :In what tree, for every node the height of its left subtree and the right subtree differ atmost by one
A :
Binary Search Tree
B :
AVL Tree
C :
Complete Tree
D :
Threaded Binary Tree
Answer: B
Q. No. :14
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. :15
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. :16
Question :The complexity of merge sort algorithm is
A :
O(n)
B :
O(log n)
C :
O(n2)
D :
O(n log n)
Answer: D
Q. No. :17
Question :Binary search algorithm can not be applied to
A :
sorted linked list
B :
sorted binary trees
C :
sorted linear array
D :
pointer array
Answer: A
Q. No. :18
Question :The infix expression A+(B-C)*D is correctly represented in prefix notation as
A :
A+B-C*D
B :
+A*-BCD
C :
ABC-D*+
D :
A+BC-D*
Answer: B
Solution
Q. No. :19
Question :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:
A :
A
B :
B
C :
C
D :
D
Answer: D
Solution
Q. No. :27
Question :Preorder is nothing but
A :
Depth first order
B :
Breadth first order
C :
Topological order
D :
Linear order
Answer: A
Q. No. :28
Question :In linked lists there are no NULL links in:
A :
Sin­gle linked list
B :
Lin­ear dou­bly linked list
C :
cir­cu­lar linked list
D :
None of the above
Answer: C
Q. No. :29
Question :Which of the following data structure store the homogeneous data elements?
A :
Arrays
B :
Records
C :
Pointers
D :
Pointers
Answer: B
Q. No. :30
Question :Stack is useful for implementing
A :
radix sort
B :
breadth first search
C :
recursion
D :
depth first search
Answer: D