Answers for "binary search trees react"

0

binary search trees react

// Performs inorder traversal of a tree
inorder(node)
{
    if(node !== null)
    {
        this.inorder(node.left);
        console.log(node.data);
        this.inorder(node.right);
    }
}
Posted by: Guest on July-25-2021
0

binary search trees react

// Performs preorder traversal of a tree   
preorder(node)
{
    if(node !== null)
    {
        console.log(node.data);
        this.preorder(node.left);
        this.preorder(node.right);
    }
}
Posted by: Guest on July-25-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language