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

Function treesort

sorts/tree_sort.py:33–43  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

31 inorder(root.right,res)
32
33def treesort(arr):
34 # Build BST
35 if len(arr) == 0:
36 return arr
37 root = node(arr[0])
38 for i in range(1,len(arr)):
39 root.insert(arr[i])
40 # Traverse BST in order.
41 res = []
42 inorder(root,res)
43 return res
44
45print(treesort([10,1,3,2,9,14,13]))

Callers 1

tree_sort.pyFile · 0.85

Calls 3

nodeClass · 0.85
inorderFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected