Commit 77f8f406 authored by Petar Maymounkov's avatar Petar Maymounkov

Fix bug in trie intersect.

parent cf0aff34
......@@ -33,7 +33,7 @@ func IntersectAtDepth(depth int, p, q *Trie) *Trie {
}
}
case !p.IsLeaf() && q.IsLeaf():
return Intersect(q, p)
return IntersectAtDepth(depth, q, p)
case !p.IsLeaf() && !q.IsLeaf():
disjointUnion := &Trie{
Branch: [2]*Trie{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment