class

AtCoder::Tree(NodeInfo, EdgeInfo)

Inherits AtCoder::UndirectedGraph / AtCoder::Graph / Reference / Object

Constructors

new(nodes : Array(NodeInfo))
Source
new(size : Int64, initial_node : NodeInfo = nil)
Source

Instance methods

diameter
Source
dist(a, b)
Source
lca(a, b)

ameba:disable Metrics/CyclomaticComplexity

Source
on_path?(a, b, c)

Returns true if node c is on the path from a to b.

Source