1. In case of insertion of a right outer node in BST.
- we apply single left rotation to make it AVL tree
- we apply single right rotation to make it AVL tree
- we apply single left rotation first and then right rotation to make it AVL tree
- we apply single right rotation first and then left rotation to make it AVL tree
2. Which one is the correct function call for the following function of calculation cube?
int cube(int& num)
3. A tree is an AVL tree if
- Anyone node fulfills the AVL condition
- At least half of the nodes fulfill the AVL condition
- All the nodes fulfill the AVL condition
4. During in-order traversal using recursive calls, if we found a node is NULL. It means this node will satisfy the following condition.
- It will not have left child
- It will not have the right child
- It will not have both left and right children
5. A parse tree should be a/an
- AVL tree
- Binary Search Tree
- Complete Binary Search Tree
6. Binary Search Tree violates the condition of AVL tree when any node has a balance equal to
- 2 or -2
- 1 or -1
7. Suppose there is a BST with elements, 13,3,14,1,4,18 and 2. Now if the method insert (4) is called, which message will be displayed?
- Node is inserted in the root
- Node is inserted in the left subtree
- Node is inserted in the right subtree
- Node already exists in the tree
8. Which data structure allows deleting data elements from front and inserting at the rear?
- Binary search tree
9. In which of the following function signatures, the value of variable “num” can not be changed in a function body?
- int cube(int num)
- int cube(int& num)
- int cube(const int& num)
- int cube(int* num)
10. In-order traversal method traverses the data in
- Non-sorted order
- Random order
- Sorted order