# Data Structures Objective Questions and Answers

The Free download links of Data Structures Objective Questions and Answers Papers enclosed below. Candidates who are going to start their preparation for the Data Structures Objective papers can use these links. Download the Data Structures Objective Papers PDF along with the Answers. Data Structures Objective Papers are updated here. A vast number of applicants are browsing on the Internet for the Data Structures Objective Question Papers & Syllabus. For those candidates, here we are providing the links for Data Structures Objective Papers. Improve your knowledge by referring the Data Structures Objective Question papers.

## Objective Questions and Answers on Data Structures

1. The order of magnitude of the worst case performance of a hash coded search (over N elements) is
(a) N
(b) \log _{2}N
(c) N log₂ N
(d) not dependent upon N

2. When key values are reals a similar data representation might be produced by using a hashing function with
(a) mod
(b) trunc
(c) div
(d) log N

3. A characteristic of the data that binary search uses but the linear search ignores, is the
(a) order of the list
(b) length of the list
(c) maximum value in the list
(d) mean of data values

4. A sort which compares adjacent elements in a list and switches where necessary is a
(a) insertion sort
(b) quick sort
(c) heap sort
(d) bubble sort

5. A full binary tree with n leaves contains
(a) n nodes
(b) 2n-1 nodes
(c) \log _{2}n nodes
(d) 2^{n} nodes

6. A full binary tree with n non-leaf nodes contains
(a) log₂ n nodes
(b) 2n nodes
(c) n + 1 nodes
(d) 2n + 1 nodes

7. 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) heap sort
(c) insertion sort
(d) quick sort

8. A sort which uses the binary tree concept such that any number is larger than all the numbers in the subtree below it is called
(a) selection sort
(b) heap sort
(c) insertion sort
(d) quick sort

9. Which of the following sorting algorithms does not have a worst case running time of O(n^{2})
(a) insertion sort
(b) merge sort
(c) bubble sort
(d) quick sort

10. Which of the following sorting algorithms has a worst case running time of O(n^{r}) where, 1< r < 2?
(a) insertion sort
(b) merge sort
(c) bubble sort
(d) shell sort

11. For a linear search in an array of n elements the time complexity for best, worst and average cases are ……. and ………. respectively.
(a) O(n), O(1), and O(n/2)
(b) O/1, O(n) and O(n)
(c) O(1), O(n) and O(n/2)
(d) O(1), O(n) and ((n-1)/2)

12. What is the minimum number of fields with each node of doubly linked list
(a) 1
(b) 3
(c) 2
(d) 4

13. Let A be a sorted array of n = 10 elements. Assume that only one comparison is required to determine whether the target is equal to, less than, or greater than A[i]. Which of the following denotes the average successful time of finding an arbitrary element x in A using binary search?
(a) 1.6
(b) 4.2
(c) 2.9
(d) 5.5

14. A digital search key is implemented as a tree with n nodes each of which can contain m pointers, corresponding to the m possible symbols in each position of the key. The number of nodes that must be accessed to find a particular tree is
(a) m
(b) n^{m}
(c) n
(d) m^{n}

15. The average time required to perform a successful sequential search for an element in an array A(1:n) is given by
(a) (n + 1)/2
(b) n(n+1)/2
(c) \log _{2}n
(d) n^{2}

16. Given two sorted list of size ‘m’ and ‘n’ respectively. The number of comparisons needed in the worst case by the merge sort algorithm will be
(a) Mn
(b) max (m,n)
(c) min(m,n)
(d) m+ n-1

17. A hash function f defined as f(key)= key mod 7, with linear probing is used to insert the keys 37, 38, 72, 48, 98, 11, 56 into a table indexed from 0 to 6.11 will be stored in the location
(a) 3
(b) 5
(c) 4
(d) 6

18. The hash function
hash: = key mod size
and linear probing are used to insert the keys 37, 38, 72, 48, 96, 11, 56 into the hash table with indices 0…6. The order of the keys in the array are given by
(a) 98, 11, 37, 38, 72, 56, 48
(b) 11, 48, 37, 38, 72, 98, 56
(c) 98, 56, 37, 38, 72, 11, 48
(d) 72, 11, 37, 38, 56, 98, 48

19. What is the minimum number of edges which must be removed from a complete bipartite graph of six nodes K(6) so that the remaining graph is planar ?
(a) 2
(b) 4
(c) 3
(d) 6

20. In a complete binary tree of n nodes, how far are the most distant two nodes. Assume that each edge in the path counts as 1. Assume log (n) as log base 2.

 Practice Question Objective Papers Quiz Important Papers Mock Tests Previous Papers Typical Question Sample Question MCQs Model Papers

21. Preorder is nothing but
(a) depth first order
(b) topological order
(d) linear order

22. What traversal techniques lists the nodes of a binary search tree in ascending order?
(a) post order
(b) pre order
(c) inorder
(d) none of the above

23. Consider a sorted binary insertion tree. What must be done to produce a sorted array of numbers (for printing) from the sorted binary insertion tree?
(a) pre-order traversal
(b) in-order traversal
(c) post-order traversal
(d) top-down traversal

24. The initial configuration of queue is a, b, c, d (‘a’ is at the front). To get the configuration d, c, b, a one needs a minimum of
(a) 2 deletions and 3 additions
(b) 3 deletions and 3 additions
(c) 3 deletions and 2 additions
(d) 3 deletions and 4 additions

25. The following sequence of operations is performed on a stack push (1), push (2), pop, push (1), push (2), pop, pop, pop, push(2), pop. The sequence of popped out values are
(a) 2, 2, 1, 1, 2
(b) 2, 2, 1, 2, 2
(c) 2, 1, 2, 2, 1
(d) 2, 1, 2, 2, 2

26. The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 19, 5, 13 in ascending order, using bubble sort is
(a) 11
(b) 13
(c) 12
(d) 14

27. How many comparisons are needed to sort an array of length 5 if a straight selection sort is used and array is already in the opposite order ?
(a) 1
(b) 15
(c) 10
(d) 20

28. If memory for the run-time stack is only 150 cells (words), how big can N be in Factorial (N) before encountering stack overflow?
(a) 24
(b) 15
(c) 66
(d) 56

29. What is the number of nodes in the largest maximal independent set of the complete bipartite graph K(4,2) ?
(a) 2
(b) 3
(c) 4
(d) 6

30. Using the standard algorithm, what is the time required to determine that a number n is prime?
(a) linear time
(b) logarithmic time
(c) constant time

31. An algorithm is made up of 2 modules M1 and M2. If order of M1 is f(n) and M2 is g(n) then the order of the algorithm is
(a) max (f(n),g(n))
(b) f(n) + g(n)
(c) min (f(n), g(n))
(d) f(n)* g(n)

32. How many real links are required to store a sparse matrix of 10 rows, 10 columns, and 15 non-zero entries, (Pick up the closest answer).
(a) 15
(b) 50
(c) 20
(d) 100

33. The running time of an algorithm is given by T(n) = T(n-1) + T(n-2) – T(n-3) if n > 3 otherwise the order of the algorithm is
(a) n
(b) log n
(c) n^{n}
(d) n^{2}

34. The time complexity of an algorithm T(n), where n is the input size is given by
T(n)= T(n-1) + 1/n if n>1
1, otherwise The order of this algorithm is
(a) log n
(b) n
(c) n^{2}
(d) n^{n}

35. A one dimensional array A has indices 1…75. Each element is a string and takes up three memory works. The array is stored starting at location 1120 decimal. The starting address of A[49] is
(a) 1267
(b) 1264
(c) 1164
(d) 1169

36. Following is a recursive function for computing the sum of integers from 0 to N.
function sum (N: integer): integer
begin
if N=0 then Sum = 0
else
end ;
The missing line in the else part is
(a) Sum = N + Sum (N)
(b) Sum (N-1) + Sum (N)
(c) Sum N+ Sum (N-1)
(d) Sum = (N-1) + Sum (N-1)

37. A search technique where we keep expanding nodes with least occumulated cost so far is called
(a) Hill climbing
(b) Branch and – bound
(c) Best – first
(d) Divide and conquer

38. There are four different algorithms namely A1, A2, A3, and A4 to solve a given problem with the order log(n) loglog (n), n log(n) n/log (n) respectively. Which is the best algorithm ?
(a) A2
(b) A3
(c) A1
(d) A4

39. A text is made up of the characters a, b, c d, e each occurring with the probability 0.12, 0.4, 0.15, 0.08, and 0.25 respectively. The optimal coding technique will have the average length of
(a) 2.15
(b) 2.3
(c) 3.01
(d) 1.78

40. The Ackermann’s function
(b) can’t be solved iteratively
(c) has exponential time complexity
(d) has logarithmic time complexity

41. Which of the following sort algorithm operates in quadratic time relative to the number of elements in the array (on the average) ?
(a) quick sort
(b) bubble sort
(c) heap sort

42. Which of the following algorithms solves the all-pair shortest path problem?
(a) Dijkstra’s algorithm
(b) Prim’s algorithm
(c) Floyd’s algorithm
(d) Warshall’s algorithm

43. What is true for the complete bipartite graphs K(3, 3) and K(2, 4) ?
(a) Both are planar
(b) Both are isomorphic
(c) Neither is planar
(d) none of the above

44. Queues serve a major role in
(a) simulation of recursion
(b) simulation of limited resource allocation.
(c) simulation of arbitrary linked list
(d) expression evaluation

45. What is the number of nodes in a complete binary tree of level 5 ?
(a) 15
(b) 63
(c) 25
(d) 71

46. The linked list implementation of sparse matrices is superior to the generalized dope vector method because it is
(a) conceptually easier and completely dynamic
(b) efficient if the sparse matrix is a band matrix
(c) efficient in accessing an entry
(d) All of the above

47. Which of the following abstract data types can be used to represent a many to many relation?
(a) tree, only
(b) graph, only
(c) plex, only
(d) b and c above

48. Which of the following remarks about Trie Indexing is false?
(a) It is efficient in dealing with strings of variable length.
(b) It is efficient if there are few number of data items.
(c) The number of disk accesses can’t exceed the length of the particular string that is searched.
(d) It can handle insertions and deletions, dynamically and efficiently.

49. The average search time of hashing with linear probing will be less if the load factor
(a) is far less than one
(b) is far greater than one
(c) equals one
(d) none of the above

50. Which of the following remarks about Trie Indexing is false?
(a) It is an m-ary tree.
(b) It is a search tree of order m.
(c) Successful searches should terminate in leaf nodes.
(d) Unsuccessful searches may terminate at any level of the tree structure.