t_072_513_find_bottom_left_tree_value

package
v0.0.0-...-bdaad32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

https://leetcode.cn/problems/find-bottom-left-tree-value/
513. 找树左下角的值
中等

给定一个二叉树的 根节点 root,请找出该二叉树的 最底层 最左边 节点的值。

假设二叉树中至少有一个节点。

 

示例 1:

输入: root = [2,1,3]
输出: 1

示例 2:

输入: [1,2,3,4,null,5,6,null,null,7]
输出: 7

 

提示:

    二叉树的节点个数的范围是 [1,104]
    -231 <= Node.val <= 231 - 1 


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TreeNode

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

*

  • Definition for a binary tree node.
  • type TreeNode struct {
  • Val int
  • Left *TreeNode
  • Right *TreeNode
  • }

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL