dooleyb1 / KMPSearch

Java implementation of Knuth-Morris-Pratt string searching algorithm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KMP Search

Java implementation of a Knuth-Morris-Pratt string searching algorithm. Wikipedia

Implemented using Sedgewick & Waynes version.

Usage

To begin with compile all java files.

make

Search for a needle in a haystack.

make example

Run with the bus services real-time information text file (sourced from Translink Developer API).

make buses

Search for your own needle in a haystack_.

make find

Example

make find

Enter the pattern you would like to search for:
needle

Enter the string you would like to search for this pattern in:
haystack

Pattern entered = needle
Text entered = haystack

Checking if text 'haystack' contains the pattern 'needle'...

Pattern not found!

About

Java implementation of Knuth-Morris-Pratt string searching algorithm.

License:MIT License


Languages

Language:Java 98.6%Language:Makefile 1.4%