-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz3.html
400 lines (366 loc) · 21.9 KB
/
quiz3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Hind&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Signika+Negative:wght@700&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Prosto+One&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@500&display=swap" rel="stylesheet">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="/favi/favicon.ico">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="style.css">
<script src="https://kit.fontawesome.com/7be5b05fef.js" crossorigin="anonymous"></script>
<title>Tech Quiz</title>
</head>
<body>
<header>
<nav class="padding">
<div id="logo">
<h1>Tech Quiz</h1>
</div>
<div id="link">
<ul>
<li id="cross"><a href="javascript:void(0)" ><i class="fa-solid fa-circle-xmark"></i></a></li>
<li><a href="index.html">Home</a></li>
<li><a href="index.html#about">About</a></li>
<li><a href="index.html#contact">Contact</a></li>
</ul>
</div>
<div id="bar" class="padding"><i class="fa-solid fa-bars"></i></div>
</nav>
</header>
<section class="padding test">
<div class="test-heading">
<h1>Attempt MCQ Quiz - Level 3</h1>
</div>
<div class="test-note">
<h4>Note</h4>
<ul>
<li><i class="fa-solid fa-arrow-right"></i> Three Level Mcq Test</li>
<li><i class="fa-solid fa-arrow-right"></i> Attempt all questions</li>
<li><i class="fa-solid fa-arrow-right"></i> Score at least 80% for unlocking next level</li>
<li><i class="fa-solid fa-arrow-right"></i> Get Certificate at the end</li>
</ul>
</div>
<div class="test-question">
<h3> Q1. Suppose we are sorting an array of eight integers using heapsort, and we have just finished some heapify (either maxheapify or minheapify) operations. The array now looks like this: 16 14 15 10 12 27 28 How many heapify operations have been performed on root of heap?</h3>
<div class="options">
<ul>
<li><input type="radio" name="1" value="wrong" data-span-id="wrong-1"><span class ="opt">(A) 1</span>
<span id="wrong-1" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="1" value="correct" data-span-id ="correct-1"><span class ="opt">(B) 2</span>
<span id="correct-1" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
<li><input type="radio" name="1" value="wrong" data-span-id="wrong-2"><span class ="opt">(C) 3 and 4</span>
<span id="wrong-2" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="1" value="wrong" data-span-id="wrong-3"><span class ="opt">(D) 5</span>
<span id="wrong-3" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q2. In the above question, which entry of the array X, if TRUE, implies that there is a subset whose elements sum to W?
</h3>
<div class="options">
<ul>
<li><input type="radio" name="2" value="wrong" data-span-id="wrong-4"><span class ="opt">(A) X[1, W]</span>
<span id="wrong-4" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="2" value="wrong" data-span-id="wrong-5"><span class ="opt">(B) X[n ,0]</span>
<span id="wrong-5" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="2" value="correct" data-span-id ="correct-2"><span class ="opt">(C) X[n, W]</span>
<span id="correct-2" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
<li><input type="radio" name="2" value="wrong" data-span-id="wrong-6"><span class ="opt">(D) X[n -1, n]</span>
<span id="wrong-6" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q3. Given a sorted array of integers, what can be the minimum worst case time complexity to find ceiling of a number x in given array? Ceiling of an element x is the smallest element present in array which is greater than or equal to x. Ceiling is not present if x is greater than the maximum element present in array. For example, if the given array is {12, 67, 90, 100, 300, 399} and x = 95, then output should be 100.
</h3>
<div class="options">
<ul>
<li><input type="radio" name="3" value="wrong" data-span-id="wrong-7"><span class ="opt">(A) O(LogLogn)</span>
<span id="wrong-7" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="3" value="wrong" data-span-id="wrong-8"><span class ="opt">(B) O(n)</span>
<span id="wrong-8" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="3" value="correct" data-span-id ="correct-3"><span class ="opt">(C) O(Logn)</span>
<span id="correct-3" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
<li><input type="radio" name="3" value="wrong" data-span-id="wrong-9"><span class ="opt">(D) O(Logn * Logn)</span>
<span id="wrong-9" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q4. A 3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as follows: The root is stored in the first location, a[0], nodes in the next level, from left to right, is stored from a[1] to a[3]. The nodes from the second level of the tree from left to right are stored from a[4] location onward. An item x can be inserted into a 3-ary heap containing n items by placing x in the location a[n] and pushing it up the tree to satisfy the heap property. Which one of the following is a valid sequence of elements in an array representing 3-ary max heap?
</h3>
<div class="options">
<ul>
<li><input type="radio" name="4" value="wrong" data-span-id="wrong-10"><span class ="opt">(A) 1, 3, 5, 6, 8, 9</span>
<span id="wrong-10" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="4" value="wrong" data-span-id="wrong-11"><span class ="opt">(B) 9, 6, 3, 1, 8, 5</span>
<span id="wrong-11" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="4" value="wrong" data-span-id="wrong-12"><span class ="opt">(C) 9, 3, 6, 8, 5, 1</span>
<span id="wrong-12" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="4" value="correct" data-span-id ="correct-4"><span class ="opt">(D) 9, 5, 6, 8, 3, 1</span>
<span id="correct-4" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q5. What does the following C expression do? x = (x<<1) + x + (x>>1);
</h3>
<div class="options">
<ul>
<li><input type="radio" name="5" value="wrong" data-span-id="wrong-13"><span class ="opt">(A) Multiplies an integer with 7</span>
<span id="wrong-13" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="5" value="correct" data-span-id ="correct-5"><span class ="opt">(B) Multiplies an integer with 3.5</span>
<span id="correct-5" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
<li><input type="radio" name="5" value="wrong" data-span-id="wrong-13"><span class ="opt">(C) Multiplies an integer with 3</span>
<span id="wrong-13" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="5" value="wrong" data-span-id="wrong-14"><span class ="opt">(D) Multiplies an integer with 8</span>
<span id="wrong-14" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q6. What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?
</h3>
<div class="options">
<ul>
<li><input type="radio" name="6" value="wrong" data-span-id="wrong-15"><span class ="opt">(A) [Tex]\Theta(n^2)[/Tex]</span>
<span id="wrong-15" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="6" value="wrong" data-span-id="wrong-16"><span class ="opt">(B) [Tex]\Theta(n^2 Logn)[/Tex]</span>
<span id="wrong-16" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="6" value="correct" data-span-id ="correct-6"><span class ="opt">(C) [Tex]\Theta(n^3)[/Tex]</span>
<span id="correct-6" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
<li><input type="radio" name="6" value="wrong" data-span-id="wrong-17"><span class ="opt">(D) [Tex]\Theta(n^3 Logn)[/Tex]</span>
<span id="wrong-17" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q7. Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. Which of the following is the Huffman code for the letter a, b, c, d, e, f?
</h3>
<div class="options">
<ul>
<li><input type="radio" name="7" value="correct" data-span-id ="correct-7"><span class ="opt">(A) 0, 10, 110, 1110, 11110, 11111</span>
<span id="correct-7" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
<li><input type="radio" name="7" value="wrong" data-span-id="wrong-18"><span class ="opt">(B) 11, 10, 011, 010, 001, 000</span>
<span id="wrong-19" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="7" value="wrong" data-span-id="wrong-20"><span class ="opt">(C) 11, 10, 01, 001, 0001, 0000</span>
<span id="wrong-20" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="7" value="wrong" data-span-id="wrong-21"><span class ="opt">(D) 110, 100, 010, 000, 001, 111 </span>
<span id="wrong-21" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q8. Which of the following standard algorithms is not Dynamic Programming based.
</h3>
<div class="options">
<ul>
<li><input type="radio" name="8" value="wrong" data-span-id="wrong-22"><span class ="opt">(A) Bellman–Ford Algorithm for single source shortest path</span>
<span id="wrong-22" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="8" value="wrong" data-span-id="wrong-23"><span class ="opt">(B) Floyd Warshall Algorithm for all pairs shortest paths</span>
<span id="wrong-23" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="8" value="wrong" data-span-id="wrong-24"><span class ="opt">(C) 0-1 Knapsack problem</span>
<span id="wrong-24" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="8" value="correct" data-span-id ="correct-8"><span class ="opt">(D) Prim's Minimum Spanning Tree </span>
<span id="correct-8" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q9. What is the value of following recurrence. T(n) = 5T(n/5) + \sqrt{n}, T(1) = 1, T(0) = 0
</h3>
<div class="options">
<ul>
<li><input type="radio" name="9" value="wrong" data-span-id="wrong-25"><span class ="opt">(A) Theta (n)</span>
<span id="wrong-25" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="9" value="correct" data-span-id ="correct-9"><span class ="opt">(B) Theta (n^2)</span>
<span id="correct-9" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
<li><input type="radio" name="9" value="wrong" data-span-id="wrong-26"><span class ="opt">(C) Theta (sqrt(n))</span>
<span id="wrong-26" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="9" value="wrong" data-span-id="wrong-27"><span class ="opt">(D) Theta (nLogn) </span>
<span id="wrong-27" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
</ul>
</div>
</div>
<div class="test-question">
<h3> Q10. Consider the same recursive C function that takes two arguments <br>
unsigned int foo(unsigned int n, unsigned int r) {
if (n > 0) return (n%r + foo (n/r, r ));
else return 0;
}
</h3>
<div class="options">
<ul>
<li><input type="radio" name="10" value="wrong" data-span-id="wrong-28"><span class ="opt">(A) 9</span>
<span id="wrong-28" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="10" value="wrong" data-span-id="wrong-29"><span class ="opt">(B) 8</span>
<span id="wrong-29" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="10" value="wrong" data-span-id="wrong-30"><span class ="opt">(C) 5</span>
<span id="wrong-30" class="colRed check">
<i class="fa-solid fa-circle-xmark"></i>
</span>
</li>
<li><input type="radio" name="10" value="correct" data-span-id ="correct-10"><span class ="opt">(D) 2</span>
<span id="correct-10" class="colGreen check">
<i class="fa-solid fa-circle-check"></i>
</span>
</li>
</ul>
</div>
</div>
<!----------------------------- TODO ----------------------------->
<button id="sub-btn" class="b">Submit</button>
<button id="nxt-btn" class="b" data-next-page="certificate.html">Get Certificate</button>
</section>
<section id="contact" class="padding">
<h2>Contact Us</h2>
<div id="contact-box">
<div id="form">
<form action="">
<input type="name" placeholder="Enter Your Name" class="inherit">
<input type="email" placeholder="Enter Your Email" class="inherit">
<input type="text" placeholder="Write Your Message" class="inherit">
<button class="button">Submit</button>
</form>
</div>
<div id="social">
<a href=""><i class="fa-brands fa-square-facebook"></i></a>
<a href=""><i class="fa-brands fa-square-instagram"></i></a>
<a href=""><i class="fa-brands fa-square-twitter"></i></a>
<a href=""><i class="fa-brands fa-square-youtube"></i></a>
</div>
</div>
</section>
<section id="copyright">
<div id="copyright-text">
<p>Copyright ©, ALL RIGHT'S RESERVERD </p>
</div>
</section>
<script type="text/javascript">
var btn = document.getElementsByClassName("button");
btn[0].addEventListener("click", function(){
alert("Submitted!!");
});
</script>
<script type="text/javascript" src="result.js"></script>
</body>
</html>