pydatastructs icon indicating copy to clipboard operation
pydatastructs copied to clipboard

feat: Add Manacher's Algorithm for finding the longest palindromic substring

Open asmit27rai opened this issue 9 months ago • 4 comments

Description

This PR adds Manacher's Algorithm to the pydatastructs.strings.algorithms module. The algorithm efficiently finds the longest palindromic substring in a given string in O(n) time, where n is the length of the string.

Changes

  • Implemented the manacher function in pydatastructs.strings.algorithms.
  • Added unit tests for the manacher function in test_algorithms.py.
  • Updated the __all__ list to include manacher for public API access.

Fixes: #586

asmit27rai avatar Mar 01 '25 21:03 asmit27rai

@Kishan-Ved Pls review this PR

asmit27rai avatar Mar 02 '25 18:03 asmit27rai

@czgdp1807 It looks like the windows CI is failing from many recent PRs.

Kishan-Ved avatar Mar 03 '25 07:03 Kishan-Ved

@Kishan-Ved Make the changes but still window CI still failed. Can you pls give me idea why it is failing...

asmit27rai avatar Mar 03 '25 16:03 asmit27rai

Codecov Report

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

Please upload report for BASE (main@f4c1677). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             main      #587   +/-   ##
========================================
  Coverage        ?   97.359%           
========================================
  Files           ?        36           
  Lines           ?      4469           
  Branches        ?         0           
========================================
  Hits            ?      4351           
  Misses          ?       118           
  Partials        ?         0           
Files with missing lines Coverage Δ
pydatastructs/strings/__init__.py 100.000% <ø> (ø)
pydatastructs/strings/algorithms.py 100.000% <100.000%> (ø)

Impacted file tree graph

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Mar 10 '25 05:03 codecov[bot]