0% found this document useful (0 votes)
219 views8 pages

FDS - Unit 3 - MCQ

This document contains 50 multiple choice questions related to algorithms, data structures, complexity analysis and other computer science topics. Specifically, it covers questions about algorithm efficiency measures like time and space complexity, complexity classes like best, worst and average cases. It also includes questions about different data structures like arrays, linked lists, stacks and queues and their properties and applications.

Uploaded by

Father
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
219 views8 pages

FDS - Unit 3 - MCQ

This document contains 50 multiple choice questions related to algorithms, data structures, complexity analysis and other computer science topics. Specifically, it covers questions about algorithm efficiency measures like time and space complexity, complexity classes like best, worst and average cases. It also includes questions about different data structures like arrays, linked lists, stacks and queues and their properties and applications.

Uploaded by

Father
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 8

JSPM's

Jayawantrao sawant College of EngineeringHadpsar, Pune-33


Department of Information Technology
Multiple Choice Questions

Unit-3

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. The Worst case occur in linear search algorithm when


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

8. The complexity of linear search algorithm is


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)

11. The complexity of merge sort algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

12. The indirect change of the values of a variable in one module by another module is called
a. internal change
b. inter-module change
c. side effect
d. side-module update
13. Which of the following data structure is not linear data structure?
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

21. When determining the efficiency of algorithm, the space factor 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

22. The complexity of Bubble sort algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

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

24. If the values of a variable in one module is indirectly changed by another module, this
situation is called
a. internal change
b. inter-module change
c. side effect
d. side-module update
25. In linear search algorithm the Worst case occurs when
a. The item is somewhere in the middle of the array
b. The item is not in the array at all
c. The item is the last element in the array
d. The item is the last element in the array or is not there at all

26. For an algorithm the complexity of the average case 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 or above

27. The complexity of merge sort algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

28. The complexity of linear search algorithm is


a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)

29. When determining the efficiency of algorithm the time factor 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

30. Which of the following data structure is linear data structure?


a. Trees
b. Graphs
c. Arrays
d. None of above

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

32. Which of the following data structure is not linear data structure?
a. Arrays
b. Linked lists
c. Both of above
d. None of above

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

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

35. Finding the location of the element with a given value is:
a. Traversal
b. Search
c. Sort
d. None of above

36. Which of the following case does not exist in complexity theory
a. Best case
b. Worst case
c. Average case
d. Null case

37. The operation of processing each element in the list is known as


a. Sorting
b. Merging
c. Inserting
d. Traversal

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

39. 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
40. The complexity of Binary search algorithm is
a. O(n)
b. O(log )
c. O(n2)
d. O(n log n)

41.Which of the following data structure is non-linear type?


A) Strings
B) Lists
C) Stacks
D) Tree

42. Which of the following data structure is linear type?


A) Array
B) Tree
C) Graphs
D) Hierarchy

43. The logical or mathematical model of a particular organization of data is called a .........
A) Data structure
B) Data arrangement
C) Data configuration
D) Data formation

44. The simplest type of data structure is ..................


A) Multidimensional array
B) Linear array
C) Two dimensional array
D) Three dimensional array

45. Linear arrays are also called ...................


A) Straight line array
B) One-dimensional array
C) Vertical array
D) Horizontal array

46. 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 the above

47. Which of the following data structures are indexed structures?


A) Linear arrays
B) Linked lists
C) Graphs
D) Trees

48. Each node in a linked list has two pairs of .............. and ...................
A) Link field and information field
B) Link field and avail field
C) Avail field and information field
D) Address field and link field

49. A ........................ does not keep track of address of every element in the list.
A) Stack
B) String
C) Linear array
D) Queue

50. When does top value of the stack changes?


A) Before deletion
B) While checking underflow
C) At the time of deletion
D) After deletion

You might also like