Data Structure Quiz with Answers
Free Data Structures and Algorithms courses with real-time projects Start Now!!
This quiz contains questions based on data structure and algorithm. These are a selected set of questions that will help you recall all the important concepts of data structures and algorithms. Let’s start!!!
0 of 20 Questions completed Questions: You have already completed the quiz before. Hence you can not start it again. Quiz is loading… You must sign in or sign up to start the quiz. You must first complete the following: 0 of 20 Questions answered correctly Your time: Time has elapsed You have reached 0 of 0 point(s), (0) Earned Point(s): 0 of 0, (0) What is the output of the following code? void Fun(int); int main() { Fun(3); return 0; } void Fun(int n) { if(n>0) { Fun(n-1); cout << n; Fun(n-1) ; } } Which of the following is not an advantage of using arrays to implement the heap data structure? What is the output of the following code? void main() { int a; a=3>2<1>4<6==0; cout << a; } Which of the following statements about tree data structure is false? An arithmetic tree is generated for the expression [-a + (b * c)] / (-d). Which operator is placed at the root node? Which of the following statements about arrays and the linked list is false? Let f(n) = n2logn and g(n) = n(log n)10. Which of the following is correct? Let f(n) and g(n) be two functions. Then, which of the following options depicts the worst-case scenario? Which of the following is the definition of a connected graph? Which sorting technique should we use if we have more amount of data than the total RAM available to us? What is the postfix of the following expression? p+(q*r – s) What will be the output of the following program? int main() { int x = 2; { int x = 4; } cout << x; return 0; } What is the total number of stack permutations possible for a stack of size 3? What does the following code perform? int fun(struct node* Head){ struct node* slow, fast; slow = Head; fast = Head; while(slow && fast && fast->next){ slow = slow->next; fast = fast->next->next; if(slow == fast) return 1; } } If we wish to compute the shortest path from a given node to every other node, which of the following methods can be used? Given the graph is an unweighted, undirected graph. Which of the following methods cannot be used to code the logic for the Fibonacci series? Which of the following is true for a circular linked list? For a doubly-linked list, how many pointers do we need to perform the insertion operation? What is the time complexity of the following function? int fun(int n){ if(n == 1) return 1; else return fun(n-1) + fun(n-1); } Quiz Summary
Information
Results
Results
0 Essay(s) Pending (Possible Point(s): 0) Categories
1. Question
2. Question
3. Question
4. Question
5. Question
6. Question
7. Question
8. Question
9. Question
10. Question
11. Question
12. Question
13. Question
14. Question
15. Question
16. Question
17. Question
18. Question
19. Question
20. Question
Summary
The above Data Structure quiz contains 20 questions each of MCQ type out of which only one option is correct. It covers almost all the important topics that are important from an interview point of view.
Hope you enjoyed it.
Your opinion matters
Please write your valuable feedback about DataFlair on Google
Good course and benefits for all…
the actual answer is ‘0’ but there is no option of ‘0’ .. so i choose none of these , but it is incorrect .. the question showing the wrong output
quiz helped a lot