Erlang binary longest common substring
Valentin Micic
v@REDACTED
Mon Mar 30 17:23:59 CEST 2020
> 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 <mailto:v@REDACTED> , Your lcs function skipping the "World" word. I need "o" and "World" also count.
>
Maybe I misunderstood what you meant by "longest common prefix”.
Presuming that A and B are arbitrary binary “strings”, then:
- by common, I presumed something that is common for both A and B
- by prefix, I presumed something that precedes something else. In this context, this would be everything that A and B have in common, from left to right, before they start to differ.
This lead me to believe that <<“Hello World”>> and <<“Hellao World”>> have only <<“Hell”>> that satisfy the above criteria.
My apologies for being presumptuous.
Kind regards
V/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200330/7de53d8f/attachment.htm>
More information about the erlang-questions
mailing list