Fundamentals/Tree DP Introduction
← PrevNext →
Given the root of a binary tree, return its diameter (the length of the longest path between any two nodes, measured in edges). Use tree DP.