Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2467. Most Profitable Path in a Tree
In a rooted tree where each node has a positive or negative gate amount, Bob moves from a given node toward the root while Alice chooses a path from the root to any leaf; if they visit a node simultaneously the amount is split, otherwise only the first visitor gains/loses it — compute the maximum net income Alice can achieve. The core challenge is computing Bob's arrival times along his path and doing a DFS to maximize Alice's time-adjusted path sum.
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.