Update solution 0700

This commit is contained in:
halfrost
2021-11-26 05:21:49 -08:00
committed by halfrost
parent a7ce19c62e
commit 8ff3546b5d
2 changed files with 33 additions and 11 deletions

View File

@ -1,10 +1,20 @@
package leetcode
type TreeNode struct {
Val int
Left *TreeNode
Right *TreeNode
}
import (
"github.com/halfrost/LeetCode-Go/structures"
)
// TreeNode define
type TreeNode = structures.TreeNode
/**
* Definition for a binary tree node.
* type TreeNode struct {
* Val int
* Left *TreeNode
* Right *TreeNode
* }
*/
func searchBST(root *TreeNode, val int) *TreeNode {
if root == nil {