✅Easy solution || ✅Short & Simple || ✅Best Method || ✅Easy-To-Understand
\n# Code\n\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     TreeNode *left;\n *     TreeNode *right;\n *     TreeNode(
\n# Code\n```\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n *     int val;\n *     TreeNode *left;\n *     TreeNode *right;\n *     TreeNode() : val(0), left(nullptr), right(nullptr) {}\n *     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}\n *     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}\n * };\n */\nclass Solution {\npublic:\n    \n    int ans;\n    void inorder(TreeNode* root, int& k)\n    {\n        if(!root)\n            return;\n        inorder(root->left,k);\n        k--;\n        if(k==0)\n        {\n            ans=root->val;\n            return;\n        }\n        inorder(root->right,k);\n    }\n    int kthSmallest(TreeNode* root, int k) {\n        inorder(root, k);\n        return ans;\n        \n    }\n};\n```\nPlease **UPVOTE** if it helps \u2764\uFE0F\uD83D\uDE0A\nThank You and Happy To Help You!!
['C++']