Python Recursive Solution Using Inorder Traversal
We Know in BST if we do inorder traversal  and store the values in an array then it will be in sorted order.By using this property we do the inorder traversal a
We Know in BST if we do inorder traversal  and store the values in an array then it will be in sorted order.By using this property we do the inorder traversal and return k-1th element in the array which stores the values while performing the inorder traversal \n\n```\nclass Solution:\n    def kthSmallest(self, root: Optional[TreeNode], k: int) -> int:\n        values = []\n        arr = self.inorder(root,values)\n        return arr[k-1]\n    \n    #Driver Function For Inorder Traversal\n\t#Inorder Traversal means Left -> Root -> Right\n\t\n    def inorder(self,root,a):\n        if(root):\n            self.inorder(root.left,a)\n            a.append(root.val)  #Storing The Values in the Array which is passed as an argument\n            self.inorder(root.right,a)\n        return a\n```\nPlease upvote if you understand the solution
['Recursion', 'Python']