Skip to content

Add: Suffix Automaton implementation, examples and tests#952

Open
ganga-300 wants to merge 1 commit intoDhanushNehru:mainfrom
ganga-300:feature/suffix-automaton
Open

Add: Suffix Automaton implementation, examples and tests#952
ganga-300 wants to merge 1 commit intoDhanushNehru:mainfrom
ganga-300:feature/suffix-automaton

Conversation

@ganga-300
Copy link

@ganga-300 ganga-300 commented Oct 31, 2025

Adds a Suffix Automaton implementation with utilities and tests.

Files added:

  • exercises/advanced/suffix_automaton/suffix_automaton.py
  • exercises/advanced/suffix_automaton/examples.py
  • exercises/advanced/suffix_automaton/test_suffix_automaton.py
  • exercises/advanced/suffix_automaton/README.md

This contribution includes:

  • build(s): O(n) SAM construction
  • contains(t), occurrences(t), count_distinct_substrings(), longest_common_substring(t)
  • pytest unit tests demonstrating correctness

PR checklist:

  • Files placed under exercises/advanced/suffix_automaton
  • README explains usage
  • Tests pass locally

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.

1 participant