Skip to content

Commit 472fb0c

Browse files
committed
Fixed style
1 parent 5cc85c5 commit 472fb0c

File tree

1 file changed

+3
-1
lines changed
  • src/main/kotlin/g3501_3600/s3585_find_weighted_median_node_in_tree

1 file changed

+3
-1
lines changed

src/main/kotlin/g3501_3600/s3585_find_weighted_median_node_in_tree/Solution.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ class Solution {
131131
var curr = v
132132
for (p in longMax - 1 downTo 0) {
133133
val nextNode = parent[p][curr]
134-
if (nextNode != -1 && depth[nextNode] >= depth[lca] && (dist[nextNode] - dist[lca]) >= remainingWeightFromLCA) {
134+
if (nextNode != -1 && depth[nextNode] >= depth[lca] &&
135+
(dist[nextNode] - dist[lca]) >= remainingWeightFromLCA
136+
) {
135137
curr = nextNode
136138
}
137139
}

0 commit comments

Comments
 (0)