CS-Notes
CS-Notes copied to clipboard
54. 二叉查找树的第 K 个结点
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