20 Questions

Questions and Answers

- 1.Two main measures for the efficiency of an algorithm are
- A.
Processor and memory

- B.
Complexity and capacity

- C.
Time and space

- D.
Data and space

- 2.The time factor when determining the efficiency of algorithm is measured by
- A.
Counting microseconds

- B.
Counting the number of key operations

- C.
Counting the number of statements

- D.
Counting the kilobytes of algorithm

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

- 4.Which of the following case does not exist in complexity theory
- A.
Best case

- B.
Worst case

- C.
Average case

- D.
Null case

- 5.
- A.
Item is somewhere in the middle of the array

- B.
Item is not in the array at all

- C.
Item is the last element in the array

- D.
Item is the last element in the array or is not there at all

- 6.The Average case occur in linear search algorithm
- A.
When Item is somewhere in the middle of the array

- B.
When Item is not in the array at all

- C.
When Item is the last element in the array

- D.
When Item is the last element in the array or is not there at all

- 7.
- 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 or above

- 8.
- A.
O(n)

- B.
O(log n)

- C.
O(n2)

- D.
O(n log n)

- 9.The complexity of Binary search algorithm is
- A.
O(n)

- B.
O(log )

- C.
O(n2)

- D.
O(n log n)

- 10.
- A.
O(n)

- B.
O(log n)

- C.
O(n2)

- D.
O(n log n)

- 11.The complexity of merge sort algorithm is
- A.
O(n)

- B.
O(log n)

- C.
O(n2)

- D.
O(n log n)

- 12.
- A.
Internal change

- B.
Inter-module change

- C.
Side effect

- D.
Side-module update

- 13.
- A.
Arrays

- B.
Linked lists

- C.
Both of above

- D.
None of above

- 14.Which of the following data structure is linear data structure?
- A.
Trees

- B.
Graphs

- C.
Arrays

- D.
None of above

- 15.The operation of processing each element in the list is known as
- A.
Sorting

- B.
Merging

- C.
Inserting

- D.
Traversal

- 16.Finding the location of the element with a given value is:
- A.
Traversal

- B.
Search

- C.
Sort

- D.
None of above

- 17.Arrays are best data structures
- A.
For relatively permanent collections of data

- B.
For the size of the structure and the data in the structure are constantly changing

- C.
For both of above situation

- D.
For none of above situation

- 18.Linked lists are best suited
- A.
For relatively permanent collections of data

- B.
for the size of the structure and the data in the structure are constantly changing

- C.
For both of above situation

- D.
For none of above situation

- 19.Each array
__declaration__need not give, implicitly or explicitly, the information about- A.
The name of array

- B.
the data type of array

- C.
The first data from the set to be stored

- D.
The index set of the array

- 20.The elements of an array are stored successively in memory cells because
- A.
By this way computer can keep track only the address of the first element and the addresses of other elements can be calculated

- B.
the architecture of computer memory does not allow arrays to store other than serially

- C.
Both of above

- D.
None of above