Skip to content

[EN] Implementation of the Boyer-Moore-Horspool algorithm / [FR] Implémentation de l'algorithme Boyer-Moore-Horspool

License

Notifications You must be signed in to change notification settings

coursecomputer/boyer-moore-horspool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT

boyer-moore-horspool

[EN]
Implementation of the Boyer-Moore-Horspool algorithm or Horspool's algorithm.

Boyer-Moore-Horspool is a substring search algorithm.

[FR]
Implémentation de l'algorithme de Boyer-Moore-Horspool.

Boyer-Moore-Horspool est un algorithme de recherche de sous-chaîne.

Explanation

Technology

Usage

CLI:

go test -v ./test

CODE:

import "github.com/coursecomputer/boyer-moore-horspool/source"

var index, length int
var buffer = []byte("abc abcdab abcdabcdabde")
var pattern = []byte("abcdabd") // 7
var pattern1 = []byte("abcdabdr") // 8

index = bmh.Search(buffer, pattern) // 15
index = bmh.Search(buffer, pattern1) // -1

Links

https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm
http://www.mathcs.emory.edu/~cheung/Courses/323/Syllabus/Text/Matching-Boyer-Moore2.html

About

[EN] Implementation of the Boyer-Moore-Horspool algorithm / [FR] Implémentation de l'algorithme Boyer-Moore-Horspool

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages