Site icon DataFlair

MCQ on Data Structures and Algorithms

mcq on data structures and algorithms

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

Here comes MCQ quiz on data structures and algorithms. The quiz contains questions having a problem statement and 4 choices out of which only one is correct.

Let’s start!!!

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. Dynamic programming does not work if the subproblems:

    Correct
    Incorrect
  2. Question 2 of 20
    2. Question

     What is the time complexity of Strassen’s multiplication algorithm using the Divide and conquer approach?

    Correct
    Incorrect
  3. Question 3 of 20
    3. Question

    What is the time complexity of the following code?

    for(int i=1; i<=n; i++){

        for(j=1; j<=i; j++)

            printf(“This is a dependent for loop”);

    }

    Correct
    Incorrect
  4. Question 4 of 20
    4. Question

    What will be the time complexity to find the greatest element in a max-heap?

    Correct
    Incorrect
  5. Question 5 of 20
    5. Question

    Which of the following is the most appropriate definition of a bi-connected graph?

    Correct
    Incorrect
  6. Question 6 of 20
    6. Question

    Which of the following is an application of a deque?

    Correct
    Incorrect
  7. Question 7 of 20
    7. Question

     The partition algorithm of quicksort divides the input elements into the ratio of 1:999. What is the time complexity of the algorithm?

    Correct
    Incorrect
  8. Question 8 of 20
    8. Question

    What is the time complexity of insertion operation in a priority queue?

    Correct
    Incorrect
  9. Question 9 of 20
    9. Question

    Which of the following algorithm always gives correct results for negative edges weights as well?

    Correct
    Incorrect
  10. Question 10 of 20
    10. Question

    Which of the following statement is false with respect to the divide and conquer strategy?

    Correct
    Incorrect
  11. Question 11 of 20
    11. Question

    We can solve an N-queens problem using:

    Correct
    Incorrect
  12. Question 12 of 20
    12. Question

    Huffman encoding and decoding is an application of:

    Correct
    Incorrect
  13. Question 13 of 20
    13. Question

    What is the best case time complexity for the quicksort algorithm?

    Correct
    Incorrect
  14. Question 14 of 20
    14. Question

     What is the advantage of finding the max and min element in an array by the divide and conquer technique?

    Correct
    Incorrect
  15. Question 15 of 20
    15. Question

    Dynamic programming divides the problems into a number of:

    Correct
    Incorrect
  16. Question 16 of 20
    16. Question

    Which of the following is a method to construct the binary heap data structure?

    Correct
    Incorrect
  17. Question 17 of 20
    17. Question

     How many different types of insertion can we perform on a Binary tree?

    Correct
    Incorrect
  18. Question 18 of 20
    18. Question

    A connected acyclic graph is also known as:

    Correct
    Incorrect
  19. Question 19 of 20
    19. Question

    We can access the elements of an array:

    Correct
    Incorrect
  20. Question 20 of 20
    20. Question

    What will be the output if we reverse the string “PQPPRSQ” using a stack?

    Correct
    Incorrect

Summary

As we all know, the data structures and algorithms comprise a major weightage in academics as well as interviews. Therefore, this quiz has been designed in such a way that it gives a quick revision of all the important topics. Hope you find it useful.

Exit mobile version