[Cs4800] Reg: HSR Counting Tournament
David Richards
dirich at ccs.neu.edu
Fri Dec 2 09:19:41 EST 2011
Yeah, my implementation didn't use either as well, but I was trying to find the bottleneck with the
implementation provided by the grad students.
-David
On Dec 1, 2011, at 11:35 PM, Tom Fiset wrote:
> 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
>
> _______________________________________________
> Cs4800 mailing list
> Cs4800 at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/cs4800
More information about the Cs4800
mailing list