I was using Perl and completed the first problem successfully.  I
didn't use regexes but built a tree of possible words and used
recursion to check inputs against that tree.  I'd be curious to see
how my solution compares to a regex solution in regards to
performance.  Regexes in perl are handy and powerful but I understand
they're not always the fastest in terms of computation time.

I ran out of time on the second problem but had a solution mostly
complete.  Again I used recursion to 'drop' water on each square and
see where it flowed, passing the basin number from the sink back up
the recursion stack.  It worked on the samples in the problem but
failed on the small input. I'm sure it just needed a few tweaks to get
it correct.  If you're interested and we can indeed look at submitted
code, I was registered as DarkMario.

I only got to take a brief look at the 3rd problem but I'm sure
recursion would be involved there as well.

On Sep 4, 4:50 am, KeJo <[email protected]> wrote:
> Hi,
>
> anyone solved all problems correctly using perl?
>
> I did it, but I feel there could be better ways to do it in perl.
> Please let me know so that I can compare.
>
> Regards,
> KeJo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to