Site icon i2tutorials

Data-Structures-Quiz-5

This Quiz contains totally 10 Questions each carry 1 point for you.

1. If circular queue is implemented using array having size MAX_SIZE in which array index starts with 0, front points to the first element in the queue, and rear points to the last element in the queue. Which one of the following conditions used to specify that the circular queue is empty?
Front=rear= -1
Front=rear= 0
Front=rear+1
None of the above

Correct!

Wrong!

2. What would be the time complexity if user tries to insert the element at the end of the linked list (head pointer is known)?
O(1)
O(n)
O(logn)
O(nlogn)

Correct!

Wrong!

3. Which of the following is the time complexity to search an element in the linked list?
O(1)
O(n)
O(logn)
O(nlogn)

Correct!

Wrong!

4. Which of the following statement is not true about the doubly linked list?
We can traverse in both the directions.
It requires extra space
Implementation of doubly linked list is easier than the singly linked list
It stores the addresses of the next and the previous node

Correct!

Wrong!

5. What is the maximum number of children that a node can have in a binary tree?
1
2
3
4

Correct!

Wrong!

6. Which of the following techniques is not used in the Binary tree?
Randomized traversal
Preorder traversal
Postorder traversal
Inorder traversal

Correct!

Wrong!

7. Which of the following options is not true about the Binary Search tree?
The value of the left child should be less than the root node
The value of the right child should be greater than the root node.
The left and right sub trees should also be a binary search tree
None of these

Correct!

Wrong!

8. How can we define a AVL tree?
A tree which is binary search tree and height balanced tree.
A tree which is a binary search tree but unbalanced tree.
A tree with utmost two children
A tree with utmost three children

Correct!

Wrong!

9. Why do we prefer Red Black tree over AVL tree?
Red Black trees are not strictly balanced
Red black tree requires lesser rotations than AVL tree.
AVL tree needs more space to store the balance factor.
Both 2 and 3

Correct!

Wrong!

10. Which of the following satisfies the property of the Red Black tree?
A tree which is a binary search tree but not strictly balanced tree.
A node must be either Red or Black in color and root node must be black.
A tree with maximum three children
Both 1 and 2

Correct!

Wrong!

Share the quiz to show your results !

Subscribe to see your results

Ignore & go to results

Data-Structures-Quiz-5

You got %%score%% of %%total%% right

%%description%%

%%description%%

Where to go ?

Quizzes

Loading...

Exit mobile version