Skip to content

Optimize is_subsequence function to linear time complexity #2135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

reallesee
Copy link

TITLE

Optimize is_subsequence function to linear time complexity

Description

Improve performance by replacing repeated position() calls with a single-pass algorithm that maintains proper subsequence order checking.

Description of the pull request changes and motivation.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

@FrancoGiachetta
Copy link
Contributor

Hi @reallesee! Thanks for the contribution. I left you some comments.

@reallesee
Copy link
Author

Hey FrancoGiachetta, ready for review, thanks!

@reallesee
Copy link
Author

@FrancoGiachetta all good, to be honest I got a bit confused — could you please check?

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.

2 participants