I see structural induction the usual way for proving an algorithm's termination property, but it's not that easy to prove by means of induction on a tree algorithm. Now I am struggling on proving that the pre-order tree traversal algorithm is terminable:
preorder(node)
if node == null then return
visit(node)
preorder(node.left)
preorder(node.right)
How should I prove?