MCPcopy Create free account
hub / github.com/ActiveState/code / findInorderSucc

Method findInorderSucc

recipes/Python/577898_23_Tree/recipe-577898.py:428–434  ·  view source on GitHub ↗

Returns inorder successor of any node

(self, node, a)

Source from the content-addressed store, hash-verified

426 return self.__find(self.root, a)
427
428 def findInorderSucc(self, node, a):
429 """ Returns inorder successor of any node """
430 self.lastSearchDepth = 0
431 if node.isLeafNode():
432 return node
433 new_node = node.chooseChild(a + 1)
434 return self.__nextSucc(new_node)
435
436 def insertValue(self, a):
437 """ Inserts a new value to tree and keeps it balanced """

Callers 1

removeValueMethod · 0.95

Calls 3

__nextSuccMethod · 0.95
isLeafNodeMethod · 0.80
chooseChildMethod · 0.80

Tested by

no test coverage detected