What Is The Below Pseudo Code Trying To Do Where Pt Is A Node #656
What is the below pseudo code trying to do, where pt is a node pointer and root pointer?</p> <pre><code class="language-java"> 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 </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs121 Data Structures and Algorithms. It can also be found in gs gs121 Binary Trees - Red Black Tree - Quiz No.1.
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
insert a new node
delete a node
search a node
count the number of nodes
Similar question(s) are as followings:
Online Quizzes of gs121 Data Structures and Algorithms
Binary Trees - Binary Search Tree - Quiz No.1
gs gs121 Data Structures and Algorithms
Online Quizzes
Binary Trees - Binary Search Tree - Quiz No.2
gs gs121 Data Structures and Algorithms
Online Quizzes
Binary Trees - Preorder Traversal - Quiz No.1
gs gs121 Data Structures and Algorithms
Online Quizzes