A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

21. The space factor when determining the efficiency of algorithm is measured by
a. Counting the maximum memory needed by the algorithm
b. Counting the minimum memory needed by the algorithm
c. Counting the average memory needed by the algorithm
d. Counting the maximum disk space needed by the algorithm
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Counting the maximum memory needed by the algorithm

22. Which of the following case does not exist in complexity theory
a. Best case
b. Worst case
c. Average case
d. Null case
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).Null case

23. 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 of the above
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Much more complicated to analyze than that of worst case

24. The complexity of linear search algorithm is
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).O(n)

25. The complexity of Binary search algorithm is
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).O(log n)

26. The complexity of Bubble sort algorithm is
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).O(n2)

27. The complexity of merge sort algorithm is
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).O(n log n)

28. Let A be an array of 31 numbers consisting of a sequence of 0’s followed by a sequence of 1’s. The problem is to find the smallest index i such that A[i] is 1 by probing the minimum number of locations in A. The worst case number of probes performed by an optimal algorithm is________.
a. 2
b. 3
c. 4
d. 5
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).5

29. The complexity of multiplying two matrices of order m*n and n*p is
a. mnp
b. mp
c. mn
d. np
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).mnp

30. Merging 4 sorted files containing 50, 10, 25 and 15 records will take____time.
a. O (100)
b. O (200)
c. O (175)
d. O (125)
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).O (100)

Page 3 of 7