Abstract
A longest nonnegative path in an edge-weighted tree is a path such that the sum of edge weights on it is nonnegative and the number of edges on it is as large as possible. In this paper we show that if a tree has a constant degree, then its longest nonnegative path can be found in O ( n log n ) time, where n is the number of nodes. Previously known algorithms take O ( n log 2 n ) time.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have