Search
⌘K

Leetcode 3241. Time Taken to Mark All Nodes

Given a tree where marking spreads to a neighbor in 1 unit if the target node index is odd and 2 units if it's even (i.e., asymmetric, parity-dependent edge delays), compute for every node the time to mark all nodes when that node alone is marked at t=0 — equivalently, the maximum shortest-path distance from each source under these parity-based weights (n up to 1e5).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.