Easy to understand, answer the follow up question
\n    public int kthSmallest(TreeNode root, int k) {\n       PriorityQueue queue = new PriorityQueue<>(k, Collections.reverseOrder());\n\n        kthHelper(queu
\n    public int kthSmallest(TreeNode root, int k) {\n       PriorityQueue<Integer> queue = new PriorityQueue<>(k, Collections.reverseOrder());\n\n        kthHelper(queue, root, k);\n        return queue.peek();\n    }\n\n    private void kthHelper(PriorityQueue<Integer> queue, TreeNode root, int k) {\n\n        if (root == null || queue.size() >= k) return;\n\n       kthHelper(queue, root.left, k);\n        if (queue.size() >= k) return;\n\n        queue.add(root.val);\n\n        if (root.right != null) kthHelper(queue, root.right, k);\n    }
[]