• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Top MCQs on Advance Data Structure with Answers

Question 1

Which of the following Statement is true for an AVL tree?

P1: The AVL tree must be a B-tree
P2: The AVL tree must be a Binary Search Tree.
P3: The difference between the heights of left and right subtrees for any node cannot be more than one.
P4: The AVL Tree is a self-balancing tree.

  • P1 & P4

  • P2 & P4

  • P2 & P3

  • P2, P3 And P4.

Question 2

What makes an XOR Linked list better than an ordinary linked List?

  • XOR linked list uses more memory

  • XOR linked list uses less time

  • XOR linked list uses less memory than an ordinary Linked list

  • None

Question 3

What is the time complexity taken by Red-Black Tree in insertion, deletion, and searching Operations?

  • O(N)

  • O(1)

  • O(h)

  • O(LogN)

Question 4

Which operation is used to fix violations in a Red-Black Tree after a node deletion?

  • Trimming 

  • Recoloring

  • Balancing

  • None

Question 5

What is the main disadvantage of using a Trie?

  •  High memory usage for certain datasets. 

  • Slow search speed for long strings

  • Limited support for non-string data types. 

  • Difficulty in insertion and deletion operations.

Question 6

What is the time complexity for searching an element in the Trie?

  • O(1)

  • O(LogN)

  • O(N)

  • O(N^2)

Question 7

What should be placed in the below blank space to complete the find function in Disjoint set?

int find(int i)
    if (parent[i] == i) {
        return i;
    else {
        return ________;
  • i

  • 0

  • find(i)

  • find(parent[i])

Question 8

What is the main purpose of the disjoint-set data structure?

  • To efficiently find the maximum element in a set 

  • To quickly find the minimum element in a set 

  • To efficiently perform union and find operations on disjoint sets 

  • To optimize searching in a sorted list

Question 9

A suffix array can be constructed from____ traversal of the suffix tree.

  • Breadth-first - search

  • Depth-first - search

  • Level- order

  • None

Question 10

Which of the following statements are true about Trie Data structure?

P1: There is one root node in each Trie.
P2: Each path from the root to any node represents a word or string.
P3: We can not do prefix search (or auto-complete) with Trie.
P4: There is no overhead of Hash functions in a Trie data structure.

  • P1 & P3 Only

  • P2 & P3 Only

  • P1 Only

  • P1, P2 and P4

There are 25 questions to complete.

Last Updated :
Take a part in the ongoing discussion