showing results for - "binary search trees react"
Monica
14 Jul 2016
1// Performs inorder traversal of a tree
2inorder(node)
3{
4    if(node !== null)
5    {
6        this.inorder(node.left);
7        console.log(node.data);
8        this.inorder(node.right);
9    }
10}
11
Catalina
14 Jun 2016
1// Performs preorder traversal of a tree   
2preorder(node)
3{
4    if(node !== null)
5    {
6        console.log(node.data);
7        this.preorder(node.left);
8        this.preorder(node.right);
9    }
10}
11