Python | Easy Recursive Solution | O(n) | Beats 96.85%
Code\n\n# Definition for a binary tree node.\n# class TreeNode:\n#     def __init__(self, val=0, left=None, right=None):\n#         self.val = val\n#         se
# Code\n```\n# Definition for a binary tree node.\n# class TreeNode:\n#     def __init__(self, val=0, left=None, right=None):\n#         self.val = val\n#         self.left = left\n#         self.right = right\nclass Solution:\n    def kthSmallest(self, root: Optional[TreeNode], k: int) -> int:\n\n        def tree_to_list(root) -> list:\n            if not root:\n                return []\n\n            return tree_to_list(root.right) + [root.val] + tree_to_list(root.left)\n        \n        tree_list = tree_to_list(root)\n        return tree_list[-k]\n```
['Binary Search Tree', 'Recursion', 'Binary Tree', 'Python', 'Python3']