Data Structures Interview Questions Placement paper
1. To represent hierarchical relationship between elements, which data structure is suitable?
a). Deque b).Priority c).Tree d).All of above
2. A binary tree whose every node has either zero or two children is called
a).Complete binary tree B).Binary search tree C).Extended binary tree D).None of above
3. The depth of a complete binary tree is given by
a).Dn = n log2n b).Dn = n log2n+1 c).Dn = log2n D).Dn = log2n+1
4. Which of the following data structure store the homogeneous data elements?
a).Arrays b).Records c).Pointers D).None
5. A binary tree can easily be converted into q 2-tree
a).by replacing each empty sub tree by a new internal node
b).by inserting an internal nodes for non-empty node
c).by inserting an external nodes for non-empty node
d).by replacing each empty sub tree by a new external node
6. When new data are to be inserted into a data structure, but there is no available space; this situation is usually called
a).underflow b).overflow c).housefull d).saturated
7. The complexity of Bubble sort algorithm is
a).O(n) b).O(log n) c).O(n2) d).O(n log n)
8. The data structure required to evaluate a postfix expression is
a).queue b).stack c).array d).linked-list
9. The indirect change of the values of a variable in one module by another module is called
a).internal change b).inter-module change c).side effect d).side-module update
10. The process of accessing data stored in a serial access memory is similar to manipulating data on a
a).heap b).queue c).stack d).binary tree
11. Which of the following data structure is linear data structure?
a).Trees b).Graphs c).Arrays d).None of above
12. The operation of processing each element in the list is known as
a).Sorting b).Merging c).Inserting d).Traversal
13. Finding the location of the element with a given value is:
a)Traversal b).Search c). Sort d).None of above
14. A BST is traversed in the following order recursively: Right, root, left The output sequence will be in
a).Ascending order b).Descending order c).Bitomic sequence d).No specific order
15. 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
16. Each array declaration need not give, implicitly or explicitly, the information about
a).the name of array
b).the data type of array
c).the first data from the set to be stored
d).the index set of the array
Data Structures Interview Questions-Placement paper
17. A binary tree of depth “d” is an almost complete binary tree if
a).Each leaf in the tree is either at level “d” or at level “d–1”
b).For any node “n” in the tree with a right descendent at level “d” all the left descendents of “n” that are leaves, are
also at level “d”
c).Both (a) and (b)
d).None of the above
18. Which of the following is not a limitation of binary search algorithm?
a).must use a sorted array
b).requirement of sorted array is expensive when a lot of insertion and deletions are needed
c).there must be a mechanism to access middle element directly
d).binary search algorithm is not efficient when the data elements are more than 1000.
19. Identify the data structure which allows deletions at both ends of the list but insertion at only one end.
a).Input-restricted deque b).Output-restricted deque
c).Priority queues d).None of above
20. Which of the following data structure is non-linear type?
a).Strings b).Lists c).Stacks d).None of above
21. Which of the following data structure is linear type?
a).Strings b).Lists c).Queues d).All of above
22. char txt [20] = “Hello world!\0”; How many bytes are allocated by the definition above?
a).11 bytes b).12 bytes c).13 bytes d).20 bytes e).21 bytes
23. The Average case occur in linear search algorithm
a).When Item is somewhere in the middle of the array
b).When Item is not in the array at all
c).When Item is the last element in the array
d).When Item is the last element in the array or is not there at all
24. The complexity of the average case of an algorithm is
a).Much more complicated to analyze than that of worst case
b).Much more simpler to analyze than that of worst case
c).Sometimes more complicated and some other times simpler than that of worst case
d).None or above
25. In a linked list with n nodes, the time taken to insert an element after an element pointed by some pointer is
a).0 (1)
b).0 (log n)
c).0 (n)
d).0 (n 1og n)
26. The complexity of Binary search algorithm is
a).O(n)
b).O(log )
c).O(n2)
d).O(n log n)
very good Question good
ReplyDelete