Answer:
Following are the Pseudo Code to the given question:
Explanation:
Following are the pseudo-code by using the For loop:
Defines the A function (node, element)
The node is larger than 0.
if another value of the node equals its element
Loop Break
That element if node. value becomes lower than that
Node is node equivalent.
right
Using other nodes is node equivalent.
left
Node Return
If the node is vacant
print the Tree is empty
Following are the pseudo-code by using the while loop:
Defines the function A(node,element)
While this node is not zero.
if the value of the node equals the element
Loop Break
The element if node. value is lower than
Node is node equivalent.
right
Using other nodes is equivalent to an a.left node
Node Return
If the node is vacant
print Tree is empty
following are the Pseudo-code for recursion:
Set the function A (node, key)
If no root is the same as the root or no root.
return the root.
If the root value is lower than that of the quest for key return (root. right, key)
Return your lookup (root.left,key)