Available question text
Given a tree and many trips (each traversing any path between two nodes), you must minimize the total sum of node prices across all trips by halving the prices of a chosen set of non-adjacent nodes. Core challenge: compute how often each node is used across all trip paths, then run a tree DP over the independent-set constraint (pick/skip each node) to maximize savings and hence minimize total cost.
Related questions
Continue with questions that share topics or the same question type.
- Remove Stones to Minimize the Total
Coding · Array · Greedy · Heap (Priority Queue)
- Average Selling Price
Coding
- Calculate Product Final Price
Coding
- Calculate Total Shipping Cost for an Order
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2646. Minimize the Total Price of the Trips
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source