MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / inorderTraversal

Function inorderTraversal

validate_binary_search_tree_98/solution.go:20–29  ·  view source on GitHub ↗
(root *TreeNode)

Source from the content-addressed store, hash-verified

18}
19
20func inorderTraversal(root *TreeNode) []int {
21 if root == nil {
22 return []int{}
23 }
24
25 o := inorderTraversal(root.Left)
26 o = append(o, root.Val)
27 o = append(o, inorderTraversal(root.Right)...)
28 return o
29}

Callers 1

isValidBSTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected