Algorithms

Question 1
Marks : +2 | -2
Pass Ratio : 100%
The operation of processing each element in the list is known as _________
Sorting
Merging
Inserting
Traversal
Explanation:
The operation of processing each element in the list is known as Traversal.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
Is 102 congruent to 6 modulo 16.
True
False
Explanation:
16 divide 102 – 6 = 96.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
Out of the following which property algorithms does not share?
Input
Finiteness
Generality
Constancy
Explanation:
All the others are the properties of algorithms.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
The quotient and remainder when 18 is divided by 5 is?
2 and 3
1 and 2
3 and 2
3 and 3
Explanation:
According to the Division Algorithm 18 = 5(3) + 3. Hence, quotient when 18 divided by 5 is 3 = 18 div 5 and remainder when 18 divided by 5 is 3 = 18 mod 5.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
The complexity of Bubble sort algorithm is _________
O(n)
O(log n)
O(n2)
O(n log n)
Explanation:
The worst case complexity for Bubble sort is O(n2) and best case is O(n).
Question 6
Marks : +2 | -2
Pass Ratio : 100%
Is 17 congruent to 4 modulo 6.
True
False
Explanation:
6 does not divide 17 – 4 = 13.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
The complexity of Binary search algorithm is _________
O(n)
O(log)
O(n2)
O(n log n)
Explanation:
The compexity of binary search is O(logn).
Question 8
Marks : +2 | -2
Pass Ratio : 100%
Which of the following case does not exist in complexity theory?
Best case
Worst case
Average case
Null case
Explanation:
Null case does not exist in complexity Theory.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
The quotient when 19 is divided by 6 is?
1
2
3
0
Explanation:
According to the Division Algorithm 19 = 6(3) + 1. Hence, quotient when 19 divided by 6 is 3 = 19 div 6.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
The value of 15 mod 11 is?
1
2
3
4
Explanation:
By the Division algorithm 15 = 11(1) + 4. Where the remainder is 15 mod 11.