K
kelvSYC
Suppose you have a binary tree structure, full of some values, and you
have to use the tree to lookup something based on values from a
bitstream (ie. take the left branch if the bit is zero, the right if
the bit is one, that kind of thing). The values in the tree, as well
as the general layout, is hardcoded.
I've been thinking about various ways, from multidimensional arrays to
"static initializer functions". What do you think would be the best
way to implement it?
have to use the tree to lookup something based on values from a
bitstream (ie. take the left branch if the bit is zero, the right if
the bit is one, that kind of thing). The values in the tree, as well
as the general layout, is hardcoded.
I've been thinking about various ways, from multidimensional arrays to
"static initializer functions". What do you think would be the best
way to implement it?