Function
| Static Public Summary | ||
| public |
Note that q should be random and about m (that is, log m bits) for best performance. |
|
Static Public
public rabinKarp(code: Function, d: number, q: number, one: number): Function source
import rabinKarp from '@string-searching/rabin-karp/src/rabinKarp.js'Note that q should be random and about m (that is, log m bits) for best performance. Make sure d * (q-1) <= Number.MAX_SAFE_INTEGER and q + (q-1) <= Number.MAX_SAFE_INTEGER. Otherwise use bigints.
