Laurent,
I've been studying your implementation for a while now and can't really fully
grasp it.
Can you elaborate a bit on the algorithm?
Cheers
Andreas
On 16/02/2011, at 9:45 AM, Stuart Sierra wrote:
> Cool! That's a very compact implementation.
>
> Could the same technique be adapted to give you the longest common substring?
> e.g. (foo "fooba" "baab") => "ba"
>
> Or better yet, the length of the longest common substring and the starting
> indices of each common substring of that length,
> e.g. (foo "baaboobaa" "baa") => {:length 3, :indices #{0 6}}
>
> -Stuart Sierra
> clojure.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
"Programs must be written for people to read, and only incidentally for
machines to execute."
- Abelson & Sussman, SICP
--
**********************************************************
Andreas Koestler, Software Engineer
Leica Geosystems Pty Ltd
270 Gladstone Road, Dutton Park QLD 4102
Main: +61 7 3891 9772 Direct: +61 7 3117 8808
Fax: +61 7 3891 9336
Email: [email protected]
************www.leica-geosystems.com*************
when it has to be right, Leica Geosystems
Please consider the environment before printing this email.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en