string_match

package
v0.0.0-...-ac1e4b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BMStringSearch

func BMStringSearch(text, pattern string) int

func KMPSearch

func KMPSearch(text, pattern string) int

KMPSearch 利用已匹配的信息来避免不必要的字符比较,时间复杂度为O(n+m)。

func NaiveStringSearch

func NaiveStringSearch(text, pattern string) int

NaiveStringSearch 最简单直接的字符串匹配算法,逐个字符比较,时间复杂度为O(n*m)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL