previous | start | next

Implementing the get method

It is often convenient to write the operations on trees as recursive methods. This is because the tree is itself defined recursively.

Also the recursive code serves as an inductive proof of correctness.

Inductively, the correctness of the subtrees can be reduced down to the base case, which is obviously correct.



previous | start | next