Design and Analysis of Algorithms Objective Questions and Answers pdf for the preparation of MCA, BCA and other IT examinations. Analysis of algorithm mcqs questions. Design and analysis of algorithms mcq with answers pdf unit 1.
Design and analysis of algorithms multiple choice questions with answers pdf
1) The ___ time does not depend on the instance characteristics.
a) Compile
b) Run
c) Execution
d) None of the above
Ans: A
2) A program step is loosely defined as a ___ meaningful segment of a program.
a) Syntactically
b) Semantically
c) Syntactically or semantically
d) All of the above
Ans: C
3) Comments in a program count as ___ steps.
a) 0
b) 1
c) 2
d) 3
Ans: A
4) O(n) is ___
a) Linear
b) Quadrate
c) Cubic
d) Exponential
Ans: A
5) (n2 ) is ___.
a) Linear
b) Quadratic
c) Cubic
d) Exponential
Ans: A
6) (n3 ) is ___ .
a) Linear
b) Quadratic
c) Cubic
d) Exponential
Ans: B
7) (2n) is ___ .
a) Linear
b) Quadratic
c) Cubic
d) Exponential
Ans: B
8) A heap is a ___ tree
a) Binary
b) Completely Binary
c) Almost Completely Binary
d) None of the above
Ans: B
9) If a procedure P contains an explicit reference to itself, then is said to be ___ recursive.
a) Directly
b) Indirectly
c) Both a and b
d) None of the above
Ans: B
10) If a procedure P contains a reference to another Procedure in which Q contains a reference to P, then P is said to be ___ recursive.
a) Directly
b) Indirectly
c) Both a and b
d) None of the above
Ans: A
11) If these are n elements in the heap inserting a new element tales ___ time in the work case.
a) Q (logn)
b) (logn)
c) Ω (logn)
d) Ω (n)
Ans: B
12) If these are n elements in a heap, deleting the maximum can be done in ___ these.
a) Q (logn)
b) (logn)
c) Ω (logn)
d) Ω (n)
Ans: A
13) Worst-case complicity of heap sort is –
a) (logn)
b) (n2)
c) (nlogn)
d) (n)
Ans: B
14) A data structure is known as ___ in which a location of an item is determined directly as a function of the item itself, rather than a sequence of trial and error comparisons.
a) Arrays
b) Linked list
c) Hash table
d) Stock
Ans: C
15) The time required to locate an item in a hash table is ___.
a) (n)
b) (n2)
c) (nlogn)
d) (I)
Ans: C
16) The time required to locate an item in a hash table is ___ of the number of items in the list.
a) Independent
b) Dependent
c) Both a and b
d) None of the above
Ans: D
17) The complexity of merge sort is ___
a) (n)
b) (n logn)
c) (n2)
d) (logn)
Ans: A
18) The average time of quick sort is ___.
a) (n2)
b) (n logn)
c) (n)
d) (logn)
Ans: C
19) The worst time of quick sort is ___.
a) (n2)
b) (n logn)
c) (n)
d) (logn)
Ans: B
20) Maximum space needed for quick sort is ___.
a) (n)
b) ( logn)
c) (n logn)
d) (n2)
Ans: A
21) For a successful Binary search.
a) S (n) =1+ 1/n
b) S (n) = E/n+1
c) S (n) = n+1/n2
d) S (n) =2(n+1)/n
Ans: B
22) For unsuccessful binary search-
a) U (n) = E+ 1/n
b) U (n) = 1+ 1/n
c) U (n) = E/n+1
d) U (n) =n+1/n2
Ans: A
23) In greedy method ___function select an input from a[ ] and removes it
a) Select
b) Feasible
c) Union
d) None of the above
Ans: A
24) In the greedy method ___ a combines X with the solution and updates the objective function.
a) Select
b) Feasible
c) Union
d) None of the above
Ans: B
25) The total retrieval time of a tape drive TD is
(a) Σ d (lj) O ≤ j ≤m
(b) Σ d (lj) O ≤j≤m-1
(c) Σ d (lj) O ≤m+1
(d) None of the above
Ans: C
26) The greedy knapsack algorithm requires ___ time.
a) (n logn)
b) (logn)
c) (n)
d) (n2)
Ans: B
27) The worst case computing time for the job sequencing with deadlines is ___.
a) (n logn)
b) (logn)
c) (n)
d) (n2)
Ans: C
28) Total time taken in two-way merge tree is ___
a) (n logn)
b) (n2)
c) (n)
d) (logn)
Ans: D
29) The greedy method for optimal merge pattern has ___ computing time for the tree.
a) (n2)
b) (n logn)
c) (n)
d) (n3)
Ans: A
30) In the greedy method.
a) Only one decision sequence is generated
b) Two decision sequence is generated
c) Many decision sequences are generated
d) None of the above
Ans: B
31) In dynamic programming.
(a) One decision sequence is generated
(b) Five one decision sequence is generated
(c) Many decision sequences is generated
(d) All of the above
Ans: A
32) Pseudocode is a representation of the code required for ___.
a) A Program.
b) An Algorithm.
c) A single Instruction.
d) None of the above.
Ans: A
33) In Pseudocode code part consists of?
a) Sequence
b) Selection
c) Iteration
d) All of the above.
Ans: D
34) Each Algorithm begins with a ___.
a) Condition.
b) Parameter.
c) Return Statement.
d) Header.
Ans: D
35) A purpose in the algorithm needs to describe ___.
a) Program Execution.
b) Processing.
c) Requirements.
d) None of the above.
Ans: B
36) A linear collection of data elements where the linear node is given by means of the pointer is called____.
a) Linked List.
b) Node List.
c) Primitive list.
d) None of these.
Ans: A
37) The total number of comparisons in bubble sort is?
a) (n2).
b) (2n).
c) (nlogn).
d) None of the above.
Ans: A
38) A tree is height-balanced if the heights of the left and right subtrees of each node are within?
a) 0.
b) 1.
c) 2.
d) None of the above.
Ans: B
39) The nth element from the top of the stack S is accessible as:
a) S [Top-n].
b) S [Top + n].
c) S [Top –n –1].
d) None of the above.
Ans: B
Advertising and Sales Management MCQ pdf
40) A node n is adjacent to a node m if there is an arc from
a) M to n.
b) N to m.
c) Either m to any node or n to any node.
d) None of the above.
Ans: A
41) An adjacency matrix representation of a graph cannot contain information of:
a) Nodes.
b) Edges.
c) Direction of Edges.
d) Parallel edges.
Ans: A
42) What is the non-FIFO implementation of Queues called?
a) Priority Queue.
b) Circular Queue.
c) Normal Queue.
d) None of the above.
Ans: A
43) Which one is not a representation of a graph?
a) Adjacency matrix
b) Edge listing
c) Adjacency list
d) All represent graphs
Ans: D
44) Sorting is not possible by using which of the following methods?
a) Insertion
b) Selection
c) Exchange
d) Deletion
Ans: D
45) A binary tree with 20 nodes has null branches?
a) -20
b) 19
c) 21
d) None of the above
Ans: C
Read more MCQs of Analysis & Design of Algorithm
46) How many different trees are possible with 10 nodes?
a) 1014
b) 1016
c) 1113
d) None of the above.
Ans: A
47) There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree?
a) 8
b) 15
c) 13
d) 14
Ans: B
48) Of the following tree structure, which is, efficient considering space and time complexities?
a) Incomplete Binary Tree
b) Complete Binary Tree
c) Full Binary Tree
d) None of the above
Ans: B
49) Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
a) Yes
b) No
c) Both yes and no.
d) Can’t say.
Ans: B
50) In an AVL tree, at what condition the balancing is to be done?
a) If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.
b) If the ‘pivotal value’ (or the ‘Height factor’) is greater than 2 or less than –2.
c) If the ‘pivotal value’ (or the ‘Height factor’) is greater than 3 or less than –3.
d) None of the above.
Ans: A
Download the PDF format of Design and Analysis of Algorithms MCQs.
Conclusion
Thanks for reading the post, if you like the post on the Design and Analysis of Algorithms Objective Questions and Answers please share it with your friends on social media.
If you have any query regarding Design and analysis of algorithms multiple choice questions with answers pdf please ask thru comment box.