From bc7a54f2a10ff3bb76cf4920be53000264bad279 Mon Sep 17 00:00:00 2001 From: mzuenni Date: Tue, 29 Aug 2023 01:07:11 +0200 Subject: consistency --- graph/treeIsomorphism.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'graph/treeIsomorphism.cpp') diff --git a/graph/treeIsomorphism.cpp b/graph/treeIsomorphism.cpp index 7a1be5b..4e9ddce 100644 --- a/graph/treeIsomorphism.cpp +++ b/graph/treeIsomorphism.cpp @@ -1,11 +1,11 @@ vector> adj; map, int> known; -int treeLabel(int root, int p = -1) { +int treeLabel(int v, int from = -1) { vector children; - for (int x : adj[root]) { - if (x == p) continue; - children.push_back(treeLabel(x, root)); + for (int u : adj[v]) { + if (u == from) continue; + children.push_back(treeLabel(u, v)); } sort(all(children)); if (known.find(children) == known.end()) { -- cgit v1.2.3