Steven Klein
2005-10-04 00:03:35 UTC
My understanding of how we should be decoding is, start at the root, read a
bit, if it's a zero move to the left child, if it's a one move to the right
child, read the next bit, move etc. However, the template code does not
have a getLeftChild() function. I could just use (getRightChild() - 1) but
I assume this is not how we're expected to do it. Can someone give me a
quick outline of the proper way to decode.
Thanks,
Steven
bit, if it's a zero move to the left child, if it's a one move to the right
child, read the next bit, move etc. However, the template code does not
have a getLeftChild() function. I could just use (getRightChild() - 1) but
I assume this is not how we're expected to do it. Can someone give me a
quick outline of the proper way to decode.
Thanks,
Steven