On Fri, Sep 17, 2021 at 8:38 AM vl4deee11 <vladboychenko3...@gmail.com> wrote: > > Hello everyone, I need help, I often write algorithms on strings, and often I > need such a thing as a Z algo, is it possible to add it to a 'std/strings' > package ? > It can also be used in competitive programming, it is quite a useful thing. > > More about Z algo - > https://www.geeksforgeeks.org/z-algorithm-linear-time-pattern-searching-algorithm/
>From a quick glance this looks like an efficient way of writing strings.Contains or strings.Index. If somebody wants to write a faster version of strings.Index, and can prove it using benchmarks, we would be happy to include that in the standard library. strings.Index is already pretty heavily optimized, but if we can make it faster we will. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUax0HwxQhsoRy%3DUdCbt%3DEoBZcFdKahL6u9P0i%3DbKp8bA%40mail.gmail.com.