Follow Us
+
diff --git a/js/quiz.js b/js/quiz.js
new file mode 100644
index 0000000..192f442
--- /dev/null
+++ b/js/quiz.js
@@ -0,0 +1,84 @@
+
+function startQuiz() {
+ document.getElementById('btn').style.visibility = "hidden";
+ return displayQuestion();
+}
+
+var pos = 0, test, test_status, question, option, options, opA, opB, opC, opD,result, score = 0;
+var questions = [
+ [" In order traversal of binary search tree will produce",
+ "unsorted list",
+ "reverse of input",
+ "sorted list",
+ "none of the above",
+ "C"],
+ ["A circular linked list can be used for",
+ "Stack",
+ "Queue",
+ "Both Stack & Queue",
+ "Neither Stack or Queue",
+ "C"],
+ ["Minimum number of queues required for priority queue implementation?",
+ " 5"," 4"," 3","2","D"],
+ ["Time required to merge two sorted lists of size m and n, is",
+ "Ο(m | n)","Ο(m + n)","Ο(m log n)","Ο(n log m)","B"],
+ [ "A balance factor in AVL tree is used to check",
+ "what rotation to make.",
+ "if all child nodes are at same level.",
+ "when the last rotation occured.",
+ "if the tree is unbalanced.","D"],
+ ["The number of items used by the dynamic array contents is its ",
+ "Physical size",
+ "Capacity",
+ "Logical size",
+ "Random size","C"],
+ ["How will you implement dynamic arrays in Java?",
+ " Set",
+ " Map",
+ " HashMap",
+ "List","D"]
+];
+function $(arg) {
+ return document.getElementById(arg);
+ }
+
+function displayQuestion() {
+ test = $("test");
+ if (pos >= questions.length) {
+ test.innerHTML = "
You got " + score + " of " + questions.length + " questions correct!