leetcode_go

package module
v0.0.0-...-0616fc3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 3 Imported by: 0

README

leetcode-go

leetcode record using golang

Documentation

Index

Constants

View Source
const SEG_COUNT = 4

Variables

This section is empty.

Functions

This section is empty.

Types

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

type Node

type Node struct {
	Val       int
	Neighbors []*Node
}

Definition for a Node.

type TreeNode

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

判断是否为高度平衡二叉树 每个节点左右子树高度差绝对值不超过1

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

给定二叉树 [1,2,2,3,3,null,null,4,4]

      1
     / \
    2   2
   / \
  3   3
 / \
4   4

返回 false

type TreeNode2

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

type TreeNode3

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

*

  • Definition for a binary tree node.

*

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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