Skip to content
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

Suffix Array #243

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Suffix Array #243

wants to merge 6 commits into from

Conversation

Ankitr19
Copy link
Contributor

Thank you for your contribution. Please provide the details requested below.

ISSUE NUMBER

Please provide a link to the issue this pull request addresses.

SHORT DESCRIPTION

I have added the Suffix Array code to the string folder.

TESTING

To test the code simply provide any string in the main function of the code, and the code will generate the suffix array for the string.

@prateekiiest
Copy link
Member

you need to fix the tests first

@Ankitr19
Copy link
Contributor Author

@prateekiiest I have fixed the issue.

Copy link
Member

@prateekiiest prateekiiest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few fixes to be made.

Otherwise it looks good ㊗️ 🎆

Application of suffix array:-

Suffix array is an extremely useful data structure, it can be used for a wide range of problems. Following are some famous problems where Suffix array can be used.
1) Pattern Searching
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use * instead of numbering


The suffixes are:-

0 banana 5 a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this part more look good.

Like codify this part to make it look good. Otherwise this part looks odd

map<string,int> m;

vector<string> v;
for(int i = 0; i < s.size();i++)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments here will make it better

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

Successfully merging this pull request may close these issues.

2 participants