Skip to content

Commit

Permalink
Update README.markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinlauKL authored Mar 14, 2018
1 parent eb95619 commit 81534d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Brute-Force String Search/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ extension String {

This looks at each character in the source string in turn. If the character equals the first character of the search pattern, then the inner loop checks whether the rest of the pattern matches. If no match is found, the outer loop continues where it left off. This repeats until a complete match is found or the end of the source string is reached.

The brute-force approach works OK, but it's not very efficient (or pretty). It should work fine on small strings, though. For a smarter algorithm that works better with large chunks of text, check out [Boyer-Moore](../Boyer-Moore/) string search.
The brute-force approach works OK, but it's not very efficient (or pretty). It should work fine on small strings, though. For a smarter algorithm that works better with large chunks of text, check out [Boyer-Moore](../Boyer-Moore-Horspool) string search.

*Written for Swift Algorithm Club by Matthijs Hollemans*

0 comments on commit 81534d5

Please sign in to comment.