Erlang binary longest common substring

I Gusti Ngurah Oka Prinarjaya okaprinarjaya@REDACTED
Mon Mar 30 16:16:33 CEST 2020


Hi,

Hi @Marc Worrel, I've try using memoize version from
https://rosettacode.org/wiki/Longest_common_subsequence#Erlang
and the result also very very slow.


Pada tanggal Sen, 30 Mar 2020 pukul 21.04 Marc Worrell <marc@REDACTED>
menulis:

>
> On 30 Mar 2020, at 15:45, I Gusti Ngurah Oka Prinarjaya <
> okaprinarjaya@REDACTED> wrote:
>
> Hi All,
>
> Thank your very much for the answers,
>
> @Valentin Micic <v@REDACTED> , Your lcs function skipping the "World"
> word. I need "o" and "World" also count.
>
> @Marc Worrel, Your function also similar with Valentine Micic's function.
>
> @Richard O'Keefe , I suppose substring or subsequence is same thing, but i
> think i am wrong, the point is, i need the function to also count
> "o" from <<"Hellaao World">>, and "World" from <<"Hello World">>
> from example: lcs(<<"Hello World">>, <<"Hellaao World">>)
>
>
> Ah, you needed really a substring function.
> Then best is, indeed, use the C code or add memoization to the Erlang
> version.
>
> - Marc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200330/24e69f24/attachment.htm>


More information about the erlang-questions mailing list