Algorithm - Quiz(MCQ)
A)
Elements do not need to be in order, check each item in turn
B)
Put the elements in order, check each item in turn
C)
Put the elements in order, compare to the middle value, split the list in order and repeat
D)
Elements do not need to be in order, compare to the middle value, split the list in order and repeat

Correct Answer : Option (A) :   Elements do not need to be in order, check each item in turn

A)
Put the elements in order, check each item in turn
B)
Elements do not need to be in order, check each item in turn
C)
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
D)
Take an ordered list, compare the search value to the middle value, if it's higher than the middle take the right side of the list otherwise take the left and repeat

Correct Answer : Option (D) :   Take an ordered list, compare the search value to the middle value, if it's higher than the middle take the right side of the list otherwise take the left and repeat

A)
Tree Search
B)
Linear Search
C)
Hashing
D)
Binary Search

Correct Answer : Option (C) :   Hashing

A)
Worst than Average case
B)
Same as in Average case
C)
Better than Average case
D)
None of the above

Correct Answer : Option (A) :   Worst than Average case

A)
O(n2)
B)
O(n)
C)
O(log2n)
D)
O(nlog2n)

Correct Answer : Option (B) :   O(n)

A)
Counting microseconds
B)
Counting the number of statements
C)
Counting the kilobytes of algorithm
D)
Counting the number of key operations

Correct Answer : Option (D) :   Counting the number of key operations

A)
Tree
B)
Stack
C)
Queue
D)

A)
Backtracking
B)
Greedy method
C)
Divide and conquer
D)
Dynamic programming

Correct Answer : Option (C) :   Divide and conquer

A)
log(n)
B)
2n
C)
n*n
D)
nlog(n)

Correct Answer : Option (A) :   log(n)

A)
O(2n)
B)
O(n2)
C)
O(2n)
D)
O(n3)

Correct Answer : Option (B) :   O(n2)