Teaching Kids Programming – Longest Path in Binary Tree via Diameter Algorithm (DFS + BFS)
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary tree root, return the longest path between any two nodes in the tree. Constraints n ≤ 100,000 …