Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

All Questions

1
vote
2answers
918 views

Efficiently find smallest unique substring

Let's say we have a string $s$. We define a unique substring in $s$ as a substring that occurs only once in $s$. How can we efficiently find such a substring with the smallest length in $s$? The most ...
2
votes
1answer
226 views

Changing Rabin-Karp without modulo to Rabin-Karp with modulo

I am trying to solve a string matching problem using Rabin-karp algorithm. I made use of Horner's method for calculating hash function, but I forgot to use modulo operator. It's like this now. (this ...
0
votes
1answer
540 views

FM-index - print all patterns

How is it possible to print all patterns of length $k$ contained in a string, using the FM-index and Burrows-Wheeler transform? PROBLEM DETAIL: The input I have is: the text encoded with the Burrows-...