Site icon DataFlair

MCQ on Data Structure with Answers

mcq on data structures with answer

Free Data Structures and Algorithms courses with real-time projects Start Now!!

Data structures and algorithms are one of the most important parts of computer science. It tells which method is best to solve a particular computational problem. Here is a curated list of a few MCQ type questions with answers that will help you strengthen your hold on data structure.

Time limit: 0

Quiz Summary

0 of 20 Questions completed

Questions:

Information

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:

Results

Quiz complete. Results are being recorded.

Results

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)
0 Essay(s) Pending (Possible Point(s): 0)

Categories

  1. Not categorized 0%
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  1. Current
  2. Review / Skip
  3. Answered
  4. Correct
  5. Incorrect
  1. Question 1 of 20
    1. Question
    1. Which of the following is not an application of Depth-first search?

    Correct
    Incorrect
  2. Question 2 of 20
    2. Question

    Which of the following statements is incorrect?

    Correct
    Incorrect
  3. Question 3 of 20
    3. Question

     What approach does recursion follow?

    Correct
    Incorrect
  4. Question 4 of 20
    4. Question

     Assuming that the time complexity of the partition procedure is n log n, what is the time complexity of quicksort in the best case?

    Correct
    Incorrect
  5. Question 5 of 20
    5. Question

    What is the time complexity of the following function?

    f(n) = n logn + 10n + 4

    Correct
    Incorrect
  6. Question 6 of 20
    6. Question

    What does the following code do with respect to binary trees?

    int fun(struct node* ptr)

    {

        if(ptr == NULL)

            return 0;

        if(ptr->left == NULL && ptr->right == NULL)

            return 1;

        return fun(ptr->left)+fun(ptr->right);    

    }

    Correct
    Incorrect
  7. Question 7 of 20
    7. Question

    What is the average case complexity to find the height of quicksort? 

    Correct
    Incorrect
  8. Question 8 of 20
    8. Question

    The element which is inserted first will be removed first in:

    Correct
    Incorrect
  9. Question 9 of 20
    9. Question

    What is the maximum number of nodes in a k-ary tree of height ‘h’?

    Correct
    Incorrect
  10. Question 10 of 20
    10. Question

    Merge sort is based on the divide and conquer technique i.e. it completes in 3 steps- divides into subproblems, recursively solves and then merge. Which of these three steps is the most expensive in the merge sort?

    Correct
    Incorrect
  11. Question 11 of 20
    11. Question

    Which of the following is an example of inversion pair with respect to insertion sort?

    Correct
    Incorrect
  12. Question 12 of 20
    12. Question

    For which of the following techniques, all the search keys have to be present in the main memory?

    Correct
    Incorrect
  13. Question 13 of 20
    13. Question

    What is the space complexity to search for an element inside a heap?

    Correct
    Incorrect
  14. Question 14 of 20
    14. Question

    Given A, B and C are the three nodes present in a tree. What is the number of binary trees possible if the preorder is ABC and the inorder is BAC?

    Correct
    Incorrect
  15. Question 15 of 20
    15. Question

     What is the best case time complexity for binary search?

    Correct
    Incorrect
  16. Question 16 of 20
    16. Question

    Which of the following is not a criterion for the analysis of an algorithm?

    Correct
    Incorrect
  17. Question 17 of 20
    17. Question

    What is the output of Kruskal’s algorithm?

    Correct
    Incorrect
  18. Question 18 of 20
    18. Question

    If n denotes the number of nodes a binary tree has, what is the royal number of unlabelled binary trees possible with the ‘n’ number of nodes?

    Correct
    Incorrect
  19. Question 19 of 20
    19. Question

    What is the order of the height of a complete binary tree?

    Correct
    Incorrect
  20. Question 20 of 20
    20. Question

     Which of the following is an application of stack?

    Correct
    Incorrect

Summary

The above quiz contains questions from complexity analysis, binary trees, data structures like stacks and queues, sorting techniques and recursion, etc. Thus, the quiz will provide a good amount of recall for these concepts.

Exit mobile version