一、题目地址
https://leetcode-cn.com/problems/er-cha-sou-suo-shu-de-di-kda-jie-dian-lcof/
二、具体代码
let result;
var kthLargest = function(root, k) {this.k = k;dfs(root);return result;
};function dfs(root) {if(root === null || this.k == 0) {return;}dfs(root.right);if(--this.k === 0) {result = root.val;}dfs(root.left);
}
三、补充链接
https://leetcode-cn.com/problems/er-cha-sou-suo-shu-de-di-kda-jie-dian-lcof/solution/mian-shi-ti-54-er-cha-sou-suo-shu-de-di-k-da-jie-d/
四、补充部分
关注公众号:【深漂程序员小庄】:
内含丰富的学习资源和面试经验(不限前端、java),还有学习交流群可加,并且还有各大厂大佬可一起交流学习,一起进步~添加小庄微信,回复【加群】,可加入互联网技术交流群: