[Cs4800] Reg: HSR Counting Tournament

Tom Fiset tmfset at gmail.com
Thu Dec 1 23:35:32 EST 2011


David:
I have a feeling you don't need an Array or Stack at all.

My implementation for valid was very simple. It recursed through the 
tree ensuring that at every split in the tree, everything on the left 
was less than the question asked and everything on the right was greater 
than the question asked (and within certain bounds, (0,q) for a Compound 
and [0,q] for a simple). It ran very quickly checking even 100000 n in 
almost no time at all.

I'm fairly certain this strategy is correct and it's also very easy to 
implement.

Thoughts?

- Tom Fiset



More information about the Cs4800 mailing list