Skip to content

Conversation

idrisibrahimerten
Copy link

Describe your change:

  • Add an algorithm?
    – Added a professional Suffix Array construction (build_suffix_array) using the doubling method and LCP Array construction (build_lcp_array) via Kasai’s algorithm in strings/suffix_array.py.

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file.
  • All new Python files are placed inside an existing directory (strings/).
  • All filenames are in all lowercase characters with no spaces or dashes (suffix_array.py).
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.

```python

build_suffix_array("banana")
[5, 3, 1, 0, 4, 2]
build_lcp_array("banana", build_suffix_array("banana"))
[1, 3, 0, 0, 2]
```

If you filed a corresponding issue (e.g. “Add suffix array”), add at the bottom of “Describe your change”:
Fixes #1234

@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Jul 3, 2025
@cclauss
Copy link
Member

cclauss commented Oct 14, 2025

Closing tests_are_failing PRs to prepare for Hacktoberfest

@cclauss cclauss closed this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests are failing Do not merge until tests pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants