Easiest Traversal Without Stack & Queue || 100% || Preorder.
Using This Solution We Can Make Preorder Traversal In Binary Tree Without Using Stack And Queue.\n\n##### Global Declaration Of Ans Vector.\n\nclass Solution {\
## **Using This Solution We Can Make Preorder Traversal In Binary Tree Without Using Stack And Queue.**\n\n##### Global Declaration Of Ans Vector.\n```\nclass Solution {\npublic:\n    vector<int> v;\n    vector<int> preorderTraversal(TreeNode* root) {\n        if(root == NULL){\n            return v;\n        }\n        v.push_back(root->val);\n        preorderTraversal(root->left);\n        preorderTraversal(root->right);\n        return v;\n    }\n};\n```\n\n##### Pass By Reference Ans Vector.\n\n```\nclass Solution {\npublic:\n    void helper(TreeNode *root, vector<int> &ans){\n        if(root == NULL) return;\n        ans.push_back(root->val);\n        helper(root->left,ans);\n        helper(root->right,ans);\n    }\n    vector<int> preorderTraversal(TreeNode* root) {\n        vector<int> ans; helper(root,ans);\n        return ans;\n    }\n};\n```\n\n**Like & UpVote If You Get My Intuition Also Comment If You Have Any Query..**\n\n
['Tree', 'Binary Search Tree']