Category: Data Structure
-
Tree Data Structure Practice Questions
1. Explain the AVL tree insertion and deletion with suitable example. 2.Describe the algorithms used to perform single and double rotation on AVL tree. 3 .Explain about B-Tree with suitable example. 4.Explain about B+ trees with suitable algorithm. 5.Write short notes on 7.Construct an expression tree for the expression (a+b*c) + ((d*e+f)*g). Give the outputs…
-
Define complete binary tree.
If all its levels, possible except the last, have maximum number of nodes and if all the nodes in the last level appear as far left as possible
-
What is ‘B’ Tree?
A B-tree is a tree data structure that keeps data sorted and allows searches, insertions, and deletions in logarithmic amortized time. Unlike self-balancing binary search trees, it is optimized for systems that read and write large blocks of data. It is most commonly used in database and file systems.
-
List out the steps involved in deleting a node from a binary search tree.
▪ Deleting a node is a leaf node (ie) No children▪ Deleting a node with one child.▪ Deleting a node with two Childs.
-
What is AVL Tree?
AVL stands for Adelson-Velskii and Landis. An AVL tree is a binary search tree which has the following properties: 1.The sub-trees of every node differ in height by at most one. 2.Every sub-tree is an AVL tree. Search time is O(logn). Addition and deletion operations also take O(logn) time.
-
Define Binary Search Tree.
Binary search tree is a binary tree in which for every node X in the tree, the values of all the keys in its left subtree are smaller than the key value in X and the values of all the keys in its right subtree are larger than the key value in X.
-
What are the types of threaded binary tree?
i. Right-in threaded binary treeii. Left-in threaded binary treeiii. Fully-in threaded binary tree
-
Define threaded binary tree.
A binary tree is threaded by making all right child pointers that would normally be null point to the in order successor of the node, and all left child pointers that would normally be null point to the in order predecessor of the node.
-
Define in -order traversal?
In-order traversal entails the following steps; a. Traverse the left subtree b. Visit the root node c. Traverse the right subtree
-
Define tree– traversal and mention the type of traversals?
Visiting of each and every node in the tree exactly is called as tree traversal. Three types of tree traversal
