TheAlgorithms / C-Sharp

All algorithms implemented in C#.
GNU General Public License v3.0
7.12k stars 1.52k forks source link

Feature/bitap pattern matching #458

Closed Kalkwst closed 3 months ago

Kalkwst commented 3 months ago

This PR introduces the Bitap algorithm, a powerful string-matching technique renowned for its efficiency in finding exact patterns within text. Bitap leverages bitwise operations to achieve rapid matching, making it particularly well-suited for scenarios where speed is crucial, such as large-scale text processing, search engines, and bioinformatics applications.

The implemented functions, 1FindExactPattern1 and 1FindFuzzyPattern`, provide implementation for both exact matching and fuzzy matching using this algorithm.

Motivation

How Bitap Works (Simplified)

Pros

Cons

Use Cases

See also

Bitap Algorithm - Wikipedia


codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.88%. Comparing base (327af3d) to head (7ab8ba1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #458 +/- ## ========================================== + Coverage 94.84% 94.88% +0.03% ========================================== Files 234 235 +1 Lines 9897 9967 +70 Branches 1393 1408 +15 ========================================== + Hits 9387 9457 +70 Misses 392 392 Partials 118 118 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.