Vidyalelo
Data Structure · all questions

Advanced Trees (AVL, RedBlack, BTrees)
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

110

Questions

4/6

Page

Pick an option on a question to see the right answer and solution.

What is a time complexity for inserting an alphabet in the tree using hash maps?

Select an option to see the answer and solution.

What is the time complexity of Uttkonen's algorithm?

Select an option to see the answer and solution.

Which tree allows fast implementation of a set of string operation?

Select an option to see the answer and solution.

What is a time complexity for finding the total length of all string on all edges of a tree?

Select an option to see the answer and solution.

Who among the following algorithm is used in external memory and compression of the suffix tree?

Select an option to see the answer and solution.

A B+ tree can contain a maximum of 7 pointers in a node. What is the minimum number of keys in leaves?

Select an option to see the answer and solution.

Which of the following special type of trie is used for fast searching of the full texts?

Select an option to see the answer and solution.

For what size of nodes, the worst case of usage of space in suffix tree seen?

Select an option to see the answer and solution.

Following code snippet is the function to insert a string in a trie. Find the missing line.
private void insert(String str)
    {
        TrieNode node = root;
        for (int i = 0; i < length; i++)
        {
            int index = key.charAt(i) - 'a';
            if (node.children[index] == null)
                node.children[index] = new TrieNode();
 
            ________________________
        }
 
        node.isEndOfWord = true;
    }

Select an option to see the answer and solution.

Which of the following is false?

Select an option to see the answer and solution.

What is a time complexity for finding the longest substring that is repeated in a string?

Select an option to see the answer and solution.

What is a time complexity for finding the longest substring that is common in string S1 and S2 (n1 and n2 are the string lengths of strings s1, s2 respectively)?

Select an option to see the answer and solution.

What is a time complexity for finding the longest palindromic substring in a string by using the generalized suffix tree?

Select an option to see the answer and solution.

What is the other name for Suffix Tree?

Select an option to see the answer and solution.

AVL trees provide better insertion the 2-3 trees.

Select an option to see the answer and solution.

Which of the following is false?

Select an option to see the answer and solution.

Who proposed the concept of Suffix Tree?

Select an option to see the answer and solution.

The height of 2-3 tree with n elements is . . . . . . . .

Select an option to see the answer and solution.

Who among the following provided the first online contribution of Suffix Tree?

Select an option to see the answer and solution.

Statement 1: When a node is split during insertion, the middle key is promoted to the parent as well as retained in right half-node.
Statement 2: When a key is deleted from the leaf, it is also deleted from the non-leaf nodes of the tree.

Select an option to see the answer and solution.