Re: [SPOILER] Simple but slow recursive solution to QOTW #23

Rod Adams <[email protected]>
Newsgroups gmane.comp.lang.perl.qotw.discuss
Message-ID <[email protected]>
Daniel Martin wrote:

>Daniel Martin <[email protected]> writes:
>  
>
> <> My iterative solution bears something in common
> with two of his other routines, but it's essentially on its own.

If I had come up with that method, I likely would have considered it too 
close to AddClosing() to merit another routine, but there is enough 
difference there to claim uniqueness.

>(And I like the approach taken by insert - hadn't thought of that -
>though the %seen hash is doubtless brutal on memory for large n)
>  
>
It's also painfully slow (was more so before I moved the 'next if 
seen'), but it was a different way to do things, and therefore worth 
including.


btw, routines are sorted by speed, fastest to slowest.

-- Rod
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.