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
from
Open

Suffix Array #243

wants to merge 6 commits into from

Conversation

@Ankitr19
Copy link
Contributor

@Ankitr19 Ankitr19 commented Dec 18, 2017

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.

Ankitr19 added 2 commits Dec 18, 2017
@prateekiiest
Copy link
Member

@prateekiiest prateekiiest commented Dec 28, 2017

you need to fix the tests first

Ankitr19 added 4 commits Dec 28, 2017
Memory leak rectified.
Updated
@Ankitr19
Copy link
Contributor Author

@Ankitr19 Ankitr19 commented Dec 28, 2017

@prateekiiest I have fixed the issue.

Copy link
Member

@prateekiiest prateekiiest left a comment

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

This comment has been minimized.

@prateekiiest

prateekiiest Dec 28, 2017
Member

use * instead of numbering


The suffixes are:-

0 banana 5 a

This comment has been minimized.

@prateekiiest

prateekiiest Dec 28, 2017
Member

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++)

This comment has been minimized.

@prateekiiest

prateekiiest Dec 28, 2017
Member

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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.