Weighted Tree Diameter
Medium
Tree DP & Advanced Trees
Given an undirected tree with positive edge weights, print the length of the longest path between any two nodes.
Constraints
2 <= n <= 10^5 1 <= w <= 10^4
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.