BCA(H) - IndiaStudyChannel.com

advertisement
(to be filled by Examinee)
Student’s Name:…………………………………Student’s Code:………………………………..Date:………
______________
________________
Invigilator’s Sign
Student’s Sign
BCA(H)/BSc(IT)(H) III semester (Sessional (Minor II) Examination, Nov. 2013)
Subject: Data Structure
Duration: 1 hr.
Max Marks: 50
Marks Obtain:…………
Section A
(Objective Type Questions) 25 questions of 1 marks each
1.Which of the following data structure is non-linear type?
a. Strings
b. Lists
c. Stacks
d. None of above
2. Which of the following data structure is linear type?
a. Strings
b. Lists
c. Queues
d. All of above
3. 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
4. When converting binary tree into extended binary tree, all the original nodes in binary tree are
a. internal nodes on extended tree
b. external nodes on extended tree
c. vanished on extended tree
d. None of above
5. The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal
a. ABFCDE
b. ADBFEC
c. ABDECF d. ABDCEF
6. Which of the following sorting algorithm is of divide-and-conquer type?
a. Bubble sort
b. Insertion sort c. Quick sort
d. All of above
7. An algorithm that calls itself directly or indirectly is known as
a. Sub algorithm
b. Recursion c. Polish notation
d. Traversal algorithm
8. In a binary tree, certain null entries are replaced by special pointers which point to nodes higher in the tree for
efficiency. These special pointers are called
a. Leaf
b. branch
c. path d. thread
9. In a Heap tree
a. Values in a node is greater than every value in left sub tree and smaller than right sub tree
b. Values in a node is greater than every value in children of it
c. Both of above conditions applies
d. None of above conditions applies
10.If a node having two children is deleted from a binary tree, it is replaced by its
a) Inorder predecessor
b) Inorder successor
c) Preorder predecessor
d) None of the above
11.The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort is
a) 6
b) 5
c) 7
d) 8
12. In worst case Quick Sort has order
a) O (n log n) b) O (n2/2)
c) O (log n)
d) O (n2/4)
13.A full binary tree with n leaves contains
a) n nodes. b) log 2n nodes. c) 2n –1 nodes. d)2 n nodes.
14. Q.23 A sort which relatively 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) insertion sort. b) selection sort. c) heap sort. d) quick sort.
15.The smallest element of an array’s index is called its
a) lower bound.
b) upper bound.
c) range.
d) extraction.
16. A characteristics of the data that binary searches use but the linear search ignores is the
a) order of the list
b)lenth of the list
c) maximum value of the list. d)mean of the data values
17. The time complexity of linear search algorithm over an array of n elements is
a)O(log₂n)
b)O(n)
c) O(nlog₂n)
d)O(n²)
18. Average successful search time taken by binary search on ‘n’ items is
a) 2.6 b) 2.7
c) 2.8
d) 2.9
19. Consider this binary search tree
14
2
1
16
5
4
Suppose we remove the root, replacing it with something from the left subtree. What will be the new root?
a)1
b)2
c) 4
d) 5
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) Selection sort c) Insertion sort d)Quick sort.
Section B
(Fill in the blanks) 5 questions of 1 marks each
21. The number of nodes in a complete binary tree of level 5 is ……
22. The three common types of traversal with a binary tree are ……………,……………. and …………….
23. ………………. Is a linear while …………………….. is a non-linear data structure
24. …………… is the minimum number of nodes in a complete binary tree with depth 3.
25. A binary search tree contains the value 1,2,3,4,5,6,7,8. If tree is traversed in preorder then then
Section C
(True/False) 5 questions of 1 marks each
26. A serial search is useful when the list is in sorted order
27. For a serial search to work, the data in the array must be arranged in either alphabetic or numerical order.
28. Heap sort uses binary tree structure.
29. Selection sort can be used if the number of records in the table is too large.
30. A tree may be traversed in a non-recursive manner.
Section D
(Short questions) 4 questions of 05 marks each
31. Write an algorithm of insertion in binary search tree
32. Make a program to perform bubble sorting in array list
33. Build a heap H from the following list of numbers and sort it:
46 , 34 , 52 , 21 , 64 , 56 , 79 , 56
34. Explain the process of quick sort with example
Download