some confusion about about the double array
MountainHolder opened this issue · 1 comments
MountainHolder commented
As I know the double array can be simplified as follows:
base[r] + c = s
check[s] = r
but in you code it is implement like this:
base[r] + c = s
check[s] = base[r]
the corespondding code is check[begin + sibling.getKey()] = begin;
is it right?
hankcs commented
It's a variant. As long as you use the same formula in both building and searching phases, it is right.