Python Easy Iterative and Recursive Solution
Recursive:\n\n    def kthSmallest(self, root, k):\n        self.k = k\n        self.res = None\n        self.helper(root)\n        return self.res\n    \n    de
Recursive:\n\n    def kthSmallest(self, root, k):\n        self.k = k\n        self.res = None\n        self.helper(root)\n        return self.res\n    \n    def helper(self, node):\n        if not node:\n            return\n        self.helper(node.left)\n        self.k -= 1\n        if self.k == 0:\n            self.res = node.val\n            return\n        self.helper(node.right)\n\n\nIterative:\n\n    def kthSmallest(root, k):\n        stack = []\n        while root or stack:\n            while root:\n                stack.append(root)\n                root = root.left\n            root = stack.pop()\n            k -= 1\n            if k == 0:\n                return root.val\n            root = root.right
['Python']