Académique Documents
Professionnel Documents
Culture Documents
Home / DAA / Design and Analysis of Algorithms / quiz / Design and Analysis of Algorithms - MCQS
𝐒𝐞𝐚𝐫𝐜𝐡 𝐓𝐡𝐢𝐬 𝐁𝐥𝐨𝐠
Question
𝐅𝐀𝐂𝐄𝐁𝐎𝐎𝐊
If one was to apply Master theorem to recurrence equation T(n)=3.T(n/2)+n^2, what would be the values of a and b?
Select one:
Like Page
a. a=3,b=3
b. a=3,b=2
Be the first of your friends to like this
c. A=2,b=2
d. a=2,b=3
𝐓𝐨𝐭𝐚𝐥 𝐒𝐜𝐡𝐨𝐥𝐚𝐫
Software Architectures -
where n is the number of items and W is the capacity of knapsack. Comprehensive Reference Solution
Waseian Jul 11, 2019
Select one:
Data Storage Technologies and
a. O(nW)
Networks - Comprehensive
b. O(n) Reference Solutions
c. O(W) Waseian Jul 11, 2019
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019
Design and Analysis of Algorithms - MCQS - WASEIAN Page 2 of 9
April (8)
Question
Time complexity of LCS
Select one:
a. O(n!)
b. O(m!)
c. O(mn) {KEYWORD:Solar
The correct answer is: O(mn) Energy News}
Question
Apply Master theorem to T(n)=3.T(n/2)+n^2 and write what is f(n)
Find out about Big
Select one:
Developments in Solar
a. f(n)=n/2 Energy -Nikkei Business-
b. f(n)=n/2+n^2
c. f(n)=n^2
d. f(n)=3n/2
Select one:
a. Two Pointers and an Extra Array
b. Two Pointers
c. 2N/2 pointers and N/2 Extra Arrays
d. Two pointers and N Extra Arrays
Question
Steps of Divide and Conquer approach
Select one:
a. Combine, Divide and Conquer
b. Divide, Combine and Conquer
c. Combine, Conquer and Divide
d. Divide, Conquer and Combine
Question
Which of the following sorting algorithms does not have a worst case running time of O(n2) ?
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019
Design and Analysis of Algorithms - MCQS - WASEIAN Page 3 of 9
Select one:
a. Quick sort
b. Bubble sort
c. Insertion sort
d. Merge sort
Question
Data Structure used for the Merge Sort
Select one:
a. Two pointers and N Extra Arrays
b. Two Pointers and an Extra Array
c. Two Pointers
d. 2N/2 pointers and N/2 Extra Arrays
Question
RANDOMIZE-IN-PLACE(A)
n=A.length
For i=1 to n
Swap A[i] with A[RANDOM(I,n.]
The above procedure RANDOMIZE-IN-PLACE(A) computes
Select one:
a. a different deliberate permutation
b. a uniform deliberate permutation
c. a uniform random permutation
d. a different random permutation
Question
Time complexities of three algorithms are given. Which should execute the slowest for large values of N?
Select one:
a. O(N ½)
b. O(N)
c. O(log n)
Question
If length of the rod is 8 and the values of different pieces are given as following, then the maximum obtainable value is 22
(by cutting in two pieces of lengths 2 and 6.
length | 1 2 3 4 5 6 7 8
--------------------------------------------
price | 1 5 8 9 10 17 17 20
What is the worst case running time for the above problem
Select one:
a. O(log n)
b. O(n2)
c. O(n log n)
d. O(2n)
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019
Design and Analysis of Algorithms - MCQS - WASEIAN Page 4 of 9
Question
71. PERMUTE-BY-SHORTING(A)
n=A.length
Let P[1…n] be a new array
For i=1 to n
P[i]=RANDOM(1,n3)
Sort A, using P as sort keys
The time complexity of above algorithm is
Select one:
a. T(n ln n)
b. T(n)
c. T(n3) In
d. T(n2)
Question
______ is a condition that is always true at a particular point in an algorithm.
Select one:
a. assertion
b. exception
c. constant
d. invariant
Question
RANDOMIZE-IN-PLACE(A)
n=A.length
For i=1 to n
Swap A[i] with A[RANDOM(I,n.]
The time complexity of above algorithm is
Select one:
a. O(n)
b. O(n2)
c. O(n ln n)
d. O(n3)
Question
Merge Sort divides the list in
Select one:
a. Two parts, may not be equal
b. N parts, may not be equal
c. N equal parts
d. Two equal parts
Question
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019
Design and Analysis of Algorithms - MCQS - WASEIAN Page 5 of 9
Select one:
a. O(logn)
b. O(n!) In
c. O(n)
Question
Division Pattern of Problems in Divide and Conquer approach
Select one:
a. Random
b. Parallel
c. Recursive
d. Iterative
Question
In dynamic programming, the output to stage n become the input to
Select one:
a. stage n itself
b. stage n-1
c. stage n-2
d. stage n+1 In
Question
RANDOMIZE-IN-PLACE(A)
n=A.length
For i=1 to n
Swap A[i] with A[RANDOM(I,n)]
The above procedure RANDOMIZE-IN-PLACE(A) permutation occurs with probability
Select one:
a. Probability n
b. Probability n2
c. Probability n!
d. Probability 1/n!
Question
Which case of Master’s theorem is applicable in the recurrence relation T(n)=0.5*T(n/2)+1/n?
Select one:
a. Case 3
b. Case 2
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019
Design and Analysis of Algorithms - MCQS - WASEIAN Page 6 of 9
c. Case 1
d. Master’s theorem is not applicable
Question
In the development of dynamic programming the value of an optimal solution is computed in
Select one:
a. Top up fashion
b. Bottom up fashion
c. In any way
Question
Run Time of Merge Sort is
Select one:
a. BIG O of N log N
b. Theta of N log N
c. Gamma of n log N
d. Omega of N log N
Question
The number of operations in Matrix multiplications M1, M2, M3, M4 and M5 of sizes 5X10, 10X100, 100X2, 2X20 and
20X50
Select one:
a. 4600
b. 12890
c. 6900
d. 5830
Question
Which of the given options provides the increasing order of asymptotic complexity of functions f1, f2, f3 and f4?
f1(n) = 2^n
f2(n) = n^(3/2)
f3(n) = nLogn
f4(n) = n^(Logn)
Select one:
a. f2, f3, f1, f4
b. f3, f2, f1, f4
c. f3, f2, f4, f1
d. f2, f3, f4, f1
Question
The running time of quick sort depends on the selection of.
Select one:
a. Number of input
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019
Design and Analysis of Algorithms - MCQS - WASEIAN Page 7 of 9
Question
RANDOMIZED-HIRE – ASSISTANT (n)
Randomly permute the list of candidates
Best=0
For i=1 to n
interview candidate i
If candidate I is better than candidate best
best=i
hire candidates i
The expected hiring cost of the procedure is.
Select one:
a. O( n2)
b. O(n log n)
c. O(ln n)
d. O( n)
Question
In dynamic programming, the output to stage n become the input to
Select one:
a. Objective function
b. Optimum solution
c. Feasible solution
d. Decision stages
Question
Master theorem applies to recurrences of the form (a=1 and b>1) are two constants.
Select one:
a. T(n)=n.T(n/2)+b.f(n)
b. T(n)=n.T(n-3)+b
c. T(n)=a.T(n-1)+b
d. T(n)=a.T(n/b)+f(n)
Question
A sort which relatively passes through a list to exchange the first element with any elementless than it and then repeats
with a new first element is called________.
Select one:
a. Insertion sort
b. Bubble sort
c. heap sort
d. Quick sort
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019
Design and Analysis of Algorithms - MCQS - WASEIAN Page 8 of 9
About Waseian
At WASEIAN group, our affection to all the WASEians who have landed here for up-skilling themselves.
We come up with various knowledge assistances with the wide range of Tutorials, Quizzes, Project tasks
and Coursework as well.
Discrete Structures for Digital Electronics and Linear Algebra and Computer Programming -
Computer Science - MCQS Microprocessors - MCQS Optimization- MCQS MCQS
NO COMMENTS:
Enter your comment...
Publish Preview
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019
Design and Analysis of Algorithms - MCQS - WASEIAN Page 9 of 9
QUIZ (28)
Requirement:
-> A Waseian Candidate from each Batch. Batch stands for First year, Second year, Third year, Final Year.
-> Ned enthusiastic person to help yourself and others
Note: Be anonymous.
Contact here Subscribe us
http://www.waseian.com/2018/10/design-and-analysis-of-algorithms-mcqs.html 7/16/2019