Skip to content

bitap algorithm implemented along with pz_error updates - #24

Open
Dhivakar-collab wants to merge 5 commits into
Programming-Club-Org:devfrom
Dhivakar-collab:fuzzy
Open

bitap algorithm implemented along with pz_error updates#24
Dhivakar-collab wants to merge 5 commits into
Programming-Club-Org:devfrom
Dhivakar-collab:fuzzy

Conversation

@Dhivakar-collab

Copy link
Copy Markdown

No description provided.

@Dhivakar-collab
Dhivakar-collab marked this pull request as ready for review August 19, 2026 16:22
@san-rizz-777

Copy link
Copy Markdown
Member

Change the implementation to fuzzy search rather than exact and return type to "std::optional", consider using "pz_cxx_std.hpp" in include directory rather than "vector" or "cstdin".

@san-rizz-777

Copy link
Copy Markdown
Member
  1. Off-by-one bug: 1ULL << m should be 1ULL << (m-1), currently misses valid matches.(ex-> pattern="a" and text="a", m=1, doesn't matches trace it.)
  2. max_errors >= m warns but doesn't return keeps running with bad config.(missing return here in if block)
  3. Pass word/pattern by const&, not by value.
  4. std::vector R heap-allocates every call, use fixed std::array<st64,64>.
  5. Rename "word" to "text", it reads like the pattern.
  6. Use std::variant for return type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants