Python solution
Inorder traversal:\n\nclass Solution(object):\n    def kthSmallest(self, root, k):\n        """\n        :type root: TreeNode\n        :type k: int\n        :rt
Inorder traversal:\n```\nclass Solution(object):\n    def kthSmallest(self, root, k):\n        """\n        :type root: TreeNode\n        :type k: int\n        :rtype: int\n        """\n        stack = []\n        trav = root\n        count = 0\n        while trav or stack:\n            if trav:\n                stack.append(trav)\n                trav = trav.left\n            else:\n                u = stack.pop()\n                count += 1\n                if count == k:\n                    return u.val\n                trav = u.right\n```
[]