offer54专题

剑指offer54.二叉搜索树的第K大节点。几行0ms

第K大,所以右根左;第K小才是左根右 class Solution {int count = 0, result = 0;public int kthLargest(TreeNode root, int k) {dfs(root, k);return result;}public void dfs(TreeNode root, int k){if(root.right != null) dfs(