0687_longest-univalue-path

command
v0.0.0-...-60194e6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Unlicense Imports: 0 Imported by: 0

README

0687_longest-univalue-path

每个节点需要返回2个值:

  1. 以此为根的子树符合题意的解(最长长度)
  2. 从该节点开始(为其中一个端点)的最长路径
    • 我们还能获取节点的值 这样parent能够判断是否左右两子树的路径能够拼接

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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