Phase 1: Predict the kth smallest and the visit cost.

Given a Binary Search Tree and an integer k, return the value of the k-th smallest element (1-indexed). You have 15 nodes. You need k=3. How many of them do you actually need to look at?

FIG. 1 — THE BST AND THE QUESTION
— k = 3 —

You have 15 nodes and need the 3rd smallest. The obvious approach touches far more than 3 of them. How many? And can you do better?

FIG. 2 — PREDICT BEFORE YOU PROCEED

For k=3 on this 15-node BST, what's the 3rd smallest value? And how many node visits does it take with the obvious approach (full inorder)?