equal
deleted
inserted
replaced
86 interesting = {} |
86 interesting = {} |
87 count = max(nodes) + 1 |
87 count = max(nodes) + 1 |
88 depth = [0] * count |
88 depth = [0] * count |
89 seen = [0] * count |
89 seen = [0] * count |
90 mapping = [] |
90 mapping = [] |
91 for (i, n) in enumerate(sorted(nodes)): |
91 for i, n in enumerate(sorted(nodes)): |
92 depth[n] = 1 |
92 depth[n] = 1 |
93 b = 1 << i |
93 b = 1 << i |
94 seen[n] = b |
94 seen[n] = b |
95 interesting[b] = 1 |
95 interesting[b] = 1 |
96 mapping.append((b, n)) |
96 mapping.append((b, n)) |