In-order, pre-order and post-order traversal functions for the BST