ExamVeda
Login
Home
Binary Search Trees(B Tree)
?

What is the below pseudo code trying to do, where pt is a node pointer and root pointer?
redblack(Node root, Node pt) :
  if (root == NULL)
     return pt
 
  if (pt.data < root.data)
  {
      root.left  =   redblack(root.left, pt);
      root.left.parent = root
  }
  else if (pt.data > root.data)
  {
      root.right = redblackt(root.right, pt)
      root.right.parent = root
  }
 return root

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.