22-01-2013, 12:51 PM
JNTU ONLINE EXAMINATIONS [Mid 2 - ads] – Strikingsoon.Com
JNTU ONLINE.pdf (Size: 310.6 KB / Downloads: 34)
1. Which of the following is not a correct statement [01D01]
a. internal sorting is used if the number of items to be sorted is very large
b. External sorting is used if the number of items to be sorted is very large
c. External sorting needs auxiliary storage
d. Internal sorting needs auxiliary storage
2. There are 4 different algorithms A1,A2,A3,A4 to solve a given problem with the order
log(n),log(log(n)),nlog(n),n/log(n) respectively. Which is the best algorithm? [01D02]
a.
b.
c.
d.
3.
A1
A2
A3
A4
4. For merging two sorted lists of sizes m and n into a sorted list of size m+n, requires _ _ _ _ _
_ _ _ no.of comparisons [01M01]
a. O(m)
b. O(n)
c. O(m+n)
d. O(log(m)+log(n))
5. Given two sorted list of size 'm' and 'n' respectively. The number of comparisons needed by
the merge sort algorithm will be [01M02]
a. m x n
b. maximum of m,n
c. minimum of m,n
d. m+n-1
6. Merge sort uses [01M03]
a. divide and conquer strategy
b. backtracking approach
c. heuristic approach
d. greedy approach
7. Which of the following sorting algorithm has the worst time complexity of nlog(n)? [01S01]
a. Heap sort
b. Quick sort
c. Insertion sort
d. Selection sort
8. Sorting is not useful for [01S02]
a. report generation
b. minimizing the storage needed
c. making searching easier and efficient
d. responding to queries easily
9. In a binary search tree keys are inserted in the order {1,2,3...n} as resulr? Find insert,
delete operations take _ _ _ _ _ _ _ _ _ _ time. [02D01]
a. O (long n)
b. O (n)
c. O (n long n)
d. O (n2 )
10. A binary search tree is constructed with the following keys 20,22,26,21,13,19,18,15,26,28
The above keys are inserted in that order. Then the total keys in the left sub tree and the
right sub tree of the tree or respectably. [02M01]
a. 5,5
b. 6,4
c. 7,3
d. 4,6
11. In indexed binary search tree leftsite field contains [02S01]
a. no of elements in left sub tree
b. no of elements in left sub tree +1
c. Value of left leaf node
d. no of left leaf node +1
12. In indexed binary search tree left size field also gives the _ _ _ _ _ _ _ _ _ of an element
with respect to the elements in its sub tree [02S02]
a. Sorted order
b. Median
c. Index
d. Rank