Home
Courses
About
School
Notes
Questions
MCQ
Contact
Vocational Courses
Discrete Mathematics
Discrete Mathematics
Algorithms
Question 1
Marks :
+2
|
-2
Pass Ratio :
100%
The Worst case occur in linear search algorithm when _________
Item is somewhere in the middle of the array
Item is not in the array at all
Item is the last element in the array
Item is the last element in the array or is not there at all
Explanation:
The Worst case occur in linear search algorithm when Item is the last element in the array or is not there at all.
Question 2
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 3
Marks :
+2
|
-2
Pass Ratio :
100%
The remainder when 111 is divided by 12 is?
0
1
2
3
Explanation:
According to the Division Algorithm 111 = 12(9) + 3. Hence, remainder when 111 divided by 12 is 3 = 111 mod 12.
Question 4
Marks :
+2
|
-2
Pass Ratio :
100%
If a|b and a|c, then?
a|bc
c|a
a|(b+c)
b|a
Explanation:
If a|b and a|c then b = am and c = an for some integer m and n. Hence, b + c = a(m + n). Therefore, a|(b+c).
Question 5
Marks :
+2
|
-2
Pass Ratio :
100%
The value of 155 mod 9 is?
0
1
2
3
Explanation:
By the Division algorithm 155 = 9(17) + 2. Where remainder is 155 mod 9.
Question 6
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 7
Marks :
+2
|
-2
Pass Ratio :
100%
The worst case complexity of quick sort is _________
O(n)
O(log n)
O(n2)
O(n log n)
Explanation:
The worst case complexity of quick sort is O(n2).
Question 8
Marks :
+2
|
-2
Pass Ratio :
100%
The complexity of Fibonacci series is _________
O(2n)
O(log n)
O(n2)
O(n log n)
Explanation:
Fibonacci is f(n) = f(n-1) + f(n-2), f(0) = 0, f(1) = 1. Let g(n) = 2n. Now prove inductively that f(n) > = g(n).
Question 9
Marks :
+2
|
-2
Pass Ratio :
100%
The worst case complexity for insertion sort is _________
O(n)
O(log n)
O(n2)
O(n log n)
Explanation:
In worst case nth comparison are required to insert the nth element into correct position.
Question 10
Marks :
+2
|
-2
Pass Ratio :
100%
Is 17 congruent to 4 modulo 6.
True
False
Explanation:
6 does not divide 17 – 4 = 13.
1
2
3
4
5
6
7
8
9
10
Time Left:
Submit
Score
:
Rank
:
Accuracy
:
%
Time
:
Total Question
:
Attempted
:
Correct
:
Wrong
:
User Name
Email Id
Mobile No
Submit