#=====================================================================
# Author: Isai Damier
# Title: Visit
# Project: geekviewpoint
# Package: algorithms
#
# Time Complexity of Solution:
# Best = Average = Worst = constant.
#
# Description: This function can be anything the programmer
# needs it to be. Here it simply prints the data of a node.
#
#=====================================================================
class BST( object ):
def __init__( self ):
self.root = None
def getRoot( self ):
return self.root
def visit( self, n ):
print n.data
#========
# BST visit is customarily a private method, and so normally does
# not need to be tested. And because it is really is stub in our
# case, there is nothing to test.
#========