Added algorithm to thread a tree for inorder traversal.