中序遍历,不需要额外开辟空间,k==1就是当前根节点,返回节点值,不是就k-- * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * }; */ class Solution { public: int KthNode(TreeNode* proot, int& k) { if(!proot||!k) ...