# Data Structure Model Questions and Answers Paper

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

## Model Questions and Answers on Data Structure

1. Pre order is nothing but
(a) depth-first order
(b) topological order
(d) linear order

2. The depth of a complete binary tree with n nodes is
(a) log (n + 1)-1
(b) log (n)
(c) log (n-1) +1
(d) log n + 1

3. The number of possible ordered trees with 3 nodes A, B, C is
(a) 16
(b) 6
(c) 12
(d) 10

4. 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

5. Given 2 sorted list of size (m) and (n) respectively. The number of comparison needed in the worst case by the merge sort algorithm will be
(a) mn
(b) max (m, n)
(c) m+n-1
(d) min (m, n)

6. Which of the following traversable techniques lists are nodes of a binary search tree in ascending order?
(a) Post order
(b) Pre order
(c) In order
(d) None of these

7. The average successful search time taken by binary search on a sorted array of 10 items is
(a) 2.6
(b) 2.8
(c) 2.7
(d) 2.9

8. The initial configuration of queue is a, b, c, d to get 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

9. The following sequence of operations is performed on 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, 1, 2, 2, 1
(c) 2, 2, 1, 2, 2
(d) 2, 1, 2, 2, 2

10. A hash function defined as f (key) = key mode 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

11. The average successful search time for sequential search on ‘n’ items is
(a) n/2
(b) (n-1)/2
(c) (n+1)/2
(d) log(n) + 1

12. The running time of an algorithm T(n) where (n) is the input size is given by
T(n) = 8T (n/2) + qn, if n > 1
P, if n=1
where p, q are constants. The order of algorithm is
(a) n²
(b) n³
(c) n^{n}
(d) n

13. The running time T(n), where (n) is the input size of a recursive algorithm is given as follows
T(n) = C + T(n-1); if n>1
D, if n ≤ 1
the order of this algorithm is
(a) n^{2}
(b) n
(c) n^{3}
(d) n^{n}

14. There are 4 different algorithms A1, A2, A3, A4 to solve a given problem with the order log(n), log log (n), nlogn, n/logn respectively, which is the best algorithm?
(a) A1
(b) A4
(c) A2
(d) A3

15. The number of possible binary trees with 4 nodes is
(a) 12
(b) 13
(c) 15
(d) 14

16. 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
(a) logn
(b) n
(c) n^{2}
(d) nn

17. A text is made up of the characters a, b, c, d, e each occurring with the probability .12, .4, .15, .08 and .25 respectively. The optimal coding technique will have the average length of
(a) 2.15
(b) 2.3
(c) 3.01
(d) 1.78

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

19. The Acdermann’s function
(a) has quadratic time complexity
(b) can’t be solved interactively
(c) has exponential fine complexity
(d) has logarithmic time complexity

20. The way a card game player arranges his cards as he picks them up one by one, is an example of
(a) bubble sort
(b) insertion sort
(c) selection sort
(d) merge sort

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

21. The average number of comparison performed by the merge sort algorithm, in merging two sorted lists of length 2 is
(a) 8/3
(b) 11/7
(c) 8/5
(d) 11/6

22. Which of the following sorting methods will be the best if number of swappings done, is the only measure of efficiency?
(a) Bubble sort
(b) Insertion sort
(c) Selection sort
(d) All of the above

23. You are asked to sort 15 randomly. You should prefer
(a) bubble sort
(b) quick sort
(c) merge sort
(d) heap sort

24. The maximum number of comparisons needed to sort 7 items using radix sort is
(a) 280
(b) 40
(c) 47
(d) 38

25. Which of the following sorting algorithm has the worst time complexity of n log n?
(a) Heap sort
(b) Quick sort
(c) Insertion sort
(d) Selection sort

26. Which of the following sorting methods sorts a given set of items that is already in order or in reverse order with equal speed?
(a) Heap sort
(b) Quick sort
(c) Selection sort
(d) Insertion sort

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

28. Merge sort uses
(a) divide and conquer strategy
(b) heuristic search
(c) back tracking approach
(d) greedy approach

29. The principle of locality justifies the use of
(a) Interrupts
(b) DMA
(c) Polling
(d) cache memory

30. The merging two sorted lists of sizes m and n into a sorted list of size (m + n), we require comparisons of
(a) O (m)
(b) O (m + n)
(c) O (n)
(d) O (log m + log n)

31. A binary tree T has n leaf nodes. The number of nodes of degree 2 in T is
(a) log₂n
(b) n-1
(c) 2^{n}
(d) n

32. The minimum number of edges in a connected cyclic graph on n vertices is
(a) n-1
(b) n
(c) n + 1
(d) none of the above

33. The post fix expression for the infix expression A+ B* (C+D)/F+ D * E is
(a) AB + CD + * F/D + E*
(b) A* B+ CD/F * DE ++
(c) ABCD+*F/+DE* +
(d) A+ BCD/F* DE ++

34. Minimum number of colours needed to colour a graph vertices and 2 edges is
(a) 4
(b) 2
(c) 3
(d) 1

35. Stack is useful for implementing
(b) recursion
(c) breadth first search
(d) depth first search

36. In a circularly linked list organization; insertion of a record involves the modification of
(a) 1 pointer
(b) 3 pointers
(c) no pointer
(d) 2 pointers

37. Which of the following is useful in traversing a given graph by breadth first search?
(a) set
(b) List
(c) Stack
(d) queue

38. Which of the following is useful in implementing quick sort?
(a) set
(b) List
(c) Stack
(d) queue

39. Queue can be used to implement
(b) recursion
(c) stack
(d) list

40. The process of accessing data stored in a tape is similar to manipulating data on a
(a) stack
(b) queue
(c) list
(d) heap

41. The maximum degree of any vertex in a simple graph with n vertices is
(a) n
(b) n-1
(c) n + 1
(d) 2n-1

42. Which of the following algorithm design technique is used in the quick sort algorithm?
(a) Dynamic programming
(b) Divide and Conquer
(c) Back tracking
(d) Greedy method

43. The number of edges in a regular graph of degree d and n vertices is
(a) maximum of n, d
(b) n+d
(c) nd
(d) nd/2

44. A 3-ary tree is a tree in which every internal node has exactly 3 children. The number of leaf nodes in such a tree with 6 internal nodes will be
(a) 10
(b) 23
(c) 17
(d) 13

45. Sorting is useful for
(a) report generation
(b) making searching easier and efficient
(c) responding to queries easily
(d) all of these

46. The information about an array used in a program will be sorted in
(a) symbol table
(b) system table
(c) activation record
(d) dope vector

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

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

49. Which of the following remarks about Trie-indexing are true
(a) It is an m-ary tree
(b) Successful searches should terminate in leaf nodes
(c) Unsuccessful searches may terminate in leaf nodes level of the tree structure
(d) All of these

50. Stacks can’t be used to
(a) evaluate an arithmetic expression in post fix 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

51. Which of the following abstract data types can be used to represent a many to many relation?
(a) Tree
(b) Graph
(c) Plex
(d) both (b) and (c) above