GoConqr has a new look! Let us know what you think.

Quiz

ICS2210

🐈 💕 20 questions

Take the quiz

This quiz has question types that open in the usual player.

Questions in this quiz (20)

  1. 1RBT are always balanced
    1. ATrue
    2. BFalse
  2. 2Which of the following are typically stored in a RBT node?
    1. AA pointer to the left child, right child and the colour of the node.
    2. BWhether the node is a Nil node, a pointer to the parent, left child, right child and the colour of the node.
    3. CA pointer to the parent, left child, right child and the colour of the node.
    4. DThe height of the tree, a pointer to the left child, right child and the colour of the node.
  3. 3Which of these is true about RBT paths?
    1. ARBT longest path is 2log(n+1)
    2. BRBT shortest path is 2log(n+1)
    3. CThe number of black nodes can vary between paths
    4. DThe number of black nodes is the same in different paths
    5. EThe number of red nodes can vary between paths
    6. FThe number of red nodes is the same in different paths
    7. GThe shortest path is equal to the number of red nodes
    8. HThe shortest path is equal to the number of black nodes
  4. 4When does an RBT insertion NOT require any fix up?
    1. AParent is black
    2. BParent is red
    3. CAll of the above
    4. DNone of the above
  5. 5Which is the correct procedure to fix the violation in the image?Image for question 5
    1. APerform a right rotation between the parent and grandparent and then colour swap the parent and grandparent.
    2. BPerform a left rotation between the parent and grandparent and then colour swap the parent and grandparent
    3. CPerform a left-right rotation between the child and grandparent and then colour swap the child and grandparent
    4. DPerform a right-left rotation between the child and grandparent and then colour swap the child and grandparent
  6. 6Which is the correct procedure to fix the violation in the image?Image for question 6
    1. APerform a right rotation between the parent and grandparent and then colour swap the parent and grandparent
    2. BPerform a left rotation between the parent and grandparent and then colour swap the parent and grandparent
    3. CPerform a left-right rotation between the child and grandparent and then colour swap the child and grandparent
    4. DPerform a right-left rotation between the child and grandparent and then colour swap the child and grandparent
  7. 7Which is the correct procedure to fix the violation in the image?Image for question 7
    1. APerform a right rotation between the parent and grandparent and then colour swap the parent and grandparent
    2. BPerform a left rotation between the parent and grandparent and then colour swap the parent and grandparent
    3. CPerform a left-right rotation between the child and grandparent and then colour swap the child and grandparent
    4. DPerform a right-left rotation between the child and grandparent and then colour swap the child and grandparent
  8. 8Which is the correct procedure to fix the violation in the image?Image for question 8
    1. APerform a right rotation between the parent and grandparent and then colour swap the parent and grandparent
    2. BPerform a left rotation between the parent and grandparent and then colour swap the parent and grandparent
    3. CPerform a left-right rotation between the child and grandparent and then colour swap the child and grandparent
    4. DPerform a right-left rotation between the child and grandparent and then colour swap the child and grandparent
  9. 9If the parent and uncle are red no rotations are required when inserting.
    1. ATrue
    2. BFalse
  10. 10Which of the following is true?
    1. AInsertion and deletion can both be implemented using an iterative top-down approach
    2. BOnly insertion can be implemented using an iterative top-down approach
    3. COnly deletion can be implemented using an iterative top-down approach
    4. DNeither insertion nor deletion can be implemented using an iterative top-down approach

Information

Description
Information Technology Quiz on ICS2210, created by 🐈 💕 on 01/06/2024.
Author
🐈 💕
Language
English
Views
13
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?