[Tex/LaTex] Adding vertical arrow to Tree Node using TikZ/PGF

tikz-pgftikz-trees

I'm trying to illustrate a process of an algorithm over a Binary Search Tree, for which I need to make various figures where each time, different nodes are highlighted.

I wish to highlight these nodes using a vertical arrow that points to them, with a description text above that arrow, as well as color (gray-scale, since the document is intended for printing) highlight of the given node.

This is the code I use for my basic Binary Search Tree(*):

\begin{tikzpicture}[level/.style={sibling distance=30mm/#1}]
\node [circle,draw] (a){$26$}
    child {node [circle,draw] (b){$15$}
        child {node [circle,draw] (c){$9$}}
        child {node [circle,draw] (d){$20$}
            child {node [circle,draw] (e){$19$}}
            child {node [circle,draw] (f){$24$}}
        }
    }
    child {node [circle,draw] (g){$31$}
        child[missing]
        child {node [circle,draw] (i){$35$}
            child[missing]
            child {node [circle,draw] (k){$40$}}
        }
    };
\end{tikzpicture}

This code, when compiled (in context) will produce the following result:

My original BST

What I want to achieve is something like this:

The BST I'd like to get

I've found this question, which seeks a similar solution, however I don't wish to adjust the style of an existing graph edge, but to add a label that points to a vertex. Is there a way to do it without creating this label as a Tree vertex?

Thanks in advance!

(*) It is only a small part of the entire document. Based on an example by Manuel Kirsch, which can be found here.

Best Answer

The code

child {node [circle,draw] (i){$35$}

will define the node labelled i

So you have just to complete your tikzpicture like this, for example:

\node[above=1cm of i] (new one) {Some text};
\draw[->,>=angle 60,ultra thick] (new one) -- (i);

This may require to load the positioning library, see Tikz manual

Edit: to make a colored node, you just have to add the relevant keys in the definition of the node (node[...](i){}). I'll let you search a little :-)