MCPcopy Create free account
hub / github.com/algorithm004-03/algorithm004-03 / buildTree

Function buildTree

Week 02/id_313/LeetCode_105_313.go:14–17  ·  view source on GitHub ↗

** * Definition for a binary tree node. * type TreeNode struct { * Val int * Left *TreeNode * Right *TreeNode * } */ 主要是对 前序和中序遍历掌握够熟练 通过前序定位根结点,在中序中通过根结点找到左右节点区分。递归重复

(preorder []int, inorder []int)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

treeFunction · 0.85

Tested by

no test coverage detected