MCPcopy Index your code
hub / github.com/subbarayudu-j/TheAlgorithms-Python / insert

Method insert

sorts/tree_sort.py:11–24  ·  view source on GitHub ↗
(self,val)

Source from the content-addressed store, hash-verified

9 self.right = None
10
11 def insert(self,val):
12 if self.val:
13 if val < self.val:
14 if self.left is None:
15 self.left = node(val)
16 else:
17 self.left.insert(val)
18 elif val > self.val:
19 if self.right is None:
20 self.right = node(val)
21 else:
22 self.right.insert(val)
23 else:
24 self.val = val
25
26def inorder(root, res):
27 # Recursive travesal

Callers 9

trannigMethod · 0.45
sortMethod · 0.45
perceptron.pyFile · 0.45
trainingMethod · 0.45
sortMethod · 0.45
perceptron.pyFile · 0.45
treesortFunction · 0.45
getTextFromBlocksFunction · 0.45

Calls 1

nodeClass · 0.85

Tested by

no test coverage detected