Available question text
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).
Related questions
Continue with questions that share topics or the same question type.
- Add Edges to Make Degrees of All Nodes Even
Coding
- All Nodes Distance K in Binary Tree
Coding · Binary Tree · Breadth-First Search · Depth-First Search
- Compute time to infect all cells
Coding · Graphs · Grids & Matrices
- Find All The Lonely Nodes
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 3241. Time Taken to Mark All Nodes
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source