Tree: Preorder Traversal

  • + 0 comments

    void preOrder(Node *root) { if(root) { cout<data<<" "; preOrder(root->left); preOrder(root->right); } }