http://www.perlmonks.org?node_id=653749

vikramkone has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Least common ancestor function implemented in perl

Replies are listed 'Best First'.
Re: Least common ancestor function implemented in perl (Homework)
by erroneousBollock (Curate) on Nov 29, 2007 at 02:44 UTC
    Your protestations in a previous thread notwithstanding, this is clearly homework. What gave you away? Err, how about quoting the question verbatim (necessarily in a writing style differing from your own).

    If you're doing homework, we'd love to see what you've tried already. I suspect you've made no good-faith attempt at all. It's simply unfair to palm your work off onto PM (where someone will eventually give you an answer).

    Whether your 'homework' is for a high school, college/university, or a self-study program... the same considerations apply to effort and pay-off in the long run.

    Ethically, I also believe you should put "Homework: " in the title and <blockquote></blockquote> the question to clearly denote the text as having been written by another... (if for no ethical reason) to satisfy copyright fair-use exemptions.

    -David

Re: Least common ancestor function implemented in perl
by dragonchild (Archbishop) on Nov 29, 2007 at 03:23 UTC
    Of course, you could just look on CPAN and find Tree which will get you about 2/3's of the way there.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
Re: Least common ancestor function implemented in perl
by roboticus (Chancellor) on Nov 29, 2007 at 11:10 UTC
    vikramkone:

    While it may be able to be solved by one of the bioperl modules, the problem requests that you write the doubly-linked tree class to solve the problem. What've you tried thus far? Post some code and I'll be happy to give some feedback.

    ...roboticus