Easy || C++✅ || Recursive ✅ || Inorder ✅ || Fast🔥
If you like the solution please upvote\n\n\tclass Solution {\n\tpublic:\n\t\tint kthSmallest(TreeNode* root, int &k) {\n\t\t\tif(root == NULL)\n\t\t\t\treturn -
#### If you like the solution please upvote\n\n\tclass Solution {\n\tpublic:\n\t\tint kthSmallest(TreeNode* root, int &k) {\n\t\t\tif(root == NULL)\n\t\t\t\treturn -1;\n\n\t\t\tint val = kthSmallest(root->left, k);\n\t\t\tk--;\n\t\t\tif(k == 0)\n\t\t\t\treturn root->val;\n\t\t\telse if(k < 0)\n\t\t\t\treturn val;\n\n\t\t\treturn kthSmallest(root->right, k);\n\t\t}\n\t};
['Depth-First Search', 'Recursion', 'C']