CS301-Data Structures Quiz MCQS #Objective #Questions #Midterm

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

int cube(int& num)

{

.

.

.

- cube(&num)
- cube(&&num)
- cube(*num)
- cube(num)

- Anyone node fulfills the AVL condition
- At least half of the nodes fulfill the AVL condition
- All the nodes fulfill the AVL condition
- None

- It will not have left child
- It will not have the right child
- It will not have both left and right children
- None

- AVL tree
- Heap
- Binary Search Tree
- Complete Binary Search Tree

- 2 or -2
- 1 or -1
- 0
- None

- 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

- Stacks
- Queues
- Deques
- Binary search tree

- int cube(int num)
- int cube(int& num)
- int cube(const int& num)
- int cube(int* num)

- Non-sorted order
- Random order
- Sorted order
- None