CS-Notes icon indicating copy to clipboard operation
CS-Notes copied to clipboard

54. 二叉查找树的第 K 个结点

Open Miaooocat opened this issue 3 years ago • 0 comments

It should go with reverse inorder traversal to find Kth largest node. Thus, the steps in solution should be reversed as below: inOrder(root.right, k); inOrder(root.left, k);

https://github.com/CyC2018/CS-Notes/blob/master/notes/54.%20%E4%BA%8C%E5%8F%89%E6%9F%A5%E6%89%BE%E6%A0%91%E7%9A%84%E7%AC%AC%20K%20%E4%B8%AA%E7%BB%93%E7%82%B9.md

Miaooocat avatar Dec 17 '21 23:12 Miaooocat