Google News
logo
Algorithm - Quiz(MCQ)
A)
Brute Force
B)
Divide and Conquer
C)
Dynamic programming algorithms
D)
None of the above

Correct Answer : Option (A) :   Brute Force


Explanation : In Brute force, all the possibilities are tried.

A)
doesnot solve a base case directly
B)
a base case is not necessary
C)
a base case is necessary and is solved without recursion.
D)
None of the above

Correct Answer : Option (B) :   a base case is not necessary

A)
0-1 Knapsack problem
B)
Floyd Warshall Algorithm for all pairs shortest paths
C)
Prim's Minimum Spanning Tree
D)
Bellman–Ford Algorithm for single source shortest path

Correct Answer : Option (C) :   Prim's Minimum Spanning Tree

A)
Counting Sort is not a comparison based sorting algorithm
B)
The minimum possible time complexity of a comparison based sorting algorithm is O(nLogn) for a random input array
C)
Any comparison based sorting algorithm can be made stable by using position as a criteria when two elements are compared
D)
Heap Sort is not a comparison based sorting algorithm.

Correct Answer : Option (D) :   Heap Sort is not a comparison based sorting algorithm.

A)
n^3 / (sqrt(n))
B)
n^1.98
C)
(2^20) * n
D)
(15^10) * n + 12099

Correct Answer : Option (A) :   n^3 / (sqrt(n))

A)
Bubble
B)
Merge
C)
Insertion
D)
None of the above

Correct Answer : Option (A) :   Bubble

A)
Make an empty new list
B)
Compare the first and second elements
C)
Put the first element in the correct place
D)
Make a new list with the first item of the original list as the ordered list

Correct Answer : Option (D) :   Make a new list with the first item of the original list as the ordered list

8 .
The following two lists are to be merged, what would be the correct first step?
 
List 1
 
2 4 8 9
 
List 2
 
1 6 8 4
A)
Compare 1 and 6 and put 1 into a new list
B)
Compare 9 and 4 and put 4 into a new list
C)
Compare 2 and 1 and put 1 into a new list
D)
Compare 2 and 4 and put 2 into a new list

Correct Answer : Option (C) :   Compare 2 and 1 and put 1 into a new list

A)
Merge
B)
Insertion
C)
Bubble
D)
None of them do

Correct Answer : Option (B) :   Insertion

A)
Denary search
B)
Binary search
C)
Random search
D)
Next Item search

Correct Answer : Option (B) :   Binary search