splay tree python模板留存(from udacity software testing)
classNode:
def__init__(self,key):
self.key=key
self.left=self.right=None
defequals(self,node):
returnself.key==node.key
classSplayTree:
def__init__(self):
self.root=None
self.header=Node(None)#Forsp