INTRODUCTION: Databases: Databases use data structures such as trees, heaps, and hash tables to store and retrieve data efficiently. Operating systems: Operating systems use data… Read More
Tag Archives: Data Structures-Balanced Binary Search Trees
Which of the following operations are used by Red-Black trees to maintain balance during insertion/deletion? a) Recoloring of nodes b) Rotation (Left and Right) (A)… Read More
Is the following statement valid? A Red-Black Tree which is also a perfect Binary Tree can have all black nodes (A) Yes (B) No Answer:… Read More
What is the worst case possible height of Red-Black tree? Assume base of Log as 2 in all options (A) 2Log(n+1) (B) 1.44 Logn (C)… Read More
Which of the following is true about AVL and Red Black Trees? (A) In AVL tree insert() operation, we first traverse from root to newly… Read More
Which of the following is true about Red Black Trees? (A) The path from the root to the furthest leaf is no more than twice… Read More
Which of the following is true (A) The AVL trees are more balanced compared to Red Black Trees, but they may cause more rotations during… Read More
Consider the following left-rotate and right-rotate functions commonly used in self-adjusting BSTs T1, T2 and T3 are subtrees of the tree rooted with y (on… Read More
Which of the following is a self-adjusting or self-balancing Binary Search Tree (A) Splay Tree (B) AVL Tree (C) Red Black Tree (D) All of… Read More
Consider the following AVL tree. 60 / \ 20 100 / \ 80 120 Which of the following is updated AVL tree after insertion of… Read More
Which of the following is AVL Tree? A 100 / \ 50 200 / \ 10 300 B 100 / \ 50 200 / /… Read More
What is the worst case possible height of AVL tree? (A) 2Logn Assume base of log is 2 (B) 1.44log n Assume base of log… Read More
What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0. (A)… Read More
The worst case running time to search for an element in a balanced in a binary search tree with n2^n elements is (A) (B) (C) (D) (A) A (B)… Read More