Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2646. Minimize the Total Price of the Trips
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.