Skip to content

Commit 38343f0

Browse files
committed
consistent var names
1 parent ff31ec1 commit 38343f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/graphs/hld.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,13 @@ impl HLD {
230230
/// - Time: O((k log k) + (k log n))
231231
/// - Space: O(k)
232232
pub fn aux_tree(&self, mut nodes: Vec<usize>) -> (Vec<usize>, Vec<usize>) {
233-
nodes.sort_by(|&a, &b| self.tin[a].cmp(&self.tin[b]));
233+
nodes.sort_by(|&u, &v| self.tin[u].cmp(&self.tin[v]));
234234
let siz = nodes.len();
235235
for i in 1..siz {
236236
nodes.push(self.lca(nodes[i - 1], nodes[i]));
237237
}
238-
nodes.sort_by(|&a, &b| self.tin[a].cmp(&self.tin[b]));
238+
nodes.sort_by(|&u, &v| self.tin[u].cmp(&self.tin[v]));
239239
nodes.dedup();
240-
(mono_st(&nodes, |&x, &y| self.in_sub(x, y)), nodes)
240+
(mono_st(&nodes, |&u, &v| self.in_sub(u, v)), nodes)
241241
}
242242
}

0 commit comments

Comments
 (0)