Suffix Tree Implementation

Verified

Added on  2019/09/18

|1
|255
|306
Project
AI Summary
This project focuses on implementing a suffix tree in C++ to solve various string-related problems. The implementation includes functionalities for Longest Common Substring (LCS), substring checking, pattern searching, and counting substrings. The code is designed to handle various edge cases and is optimized for efficiency. A key feature of the pattern searching implementation is its ability to identify all occurrences of a pattern within a given text. Similarly, the substring counting function identifies the starting indices of repeated substrings. The choice of C++ was driven by the programmer's familiarity with the language and its support for multiple inheritance, which was deemed beneficial for the project's structure. The code avoids exception handling by addressing potential issues through generalized coding practices. The only limitation mentioned is a maximum text size of 10000 characters.
Document Page
Suffix Tree Assignment:
To run any task:
Go to the folder with the name of the task.
You will have a compile.sh and run.sh bash scripts.
First run compile.sh.
Then run.sh
For tasks LCS, Substring Check and Pattern Searching you just need to give the program a text
and a pattern.
But for all other tasks, while entering text, please end with $ to mark the end of text.
The unique points about my implementation:
1. In the Pattern Searching part, my implementation mentions all the positions at which the
pattern was found.
2. In the count substrings part, my implementation specifies the starting indexes of the
substring that is occurring many times in the text given.
My choice for using CPP is because I am comfortable in it, and also because if I had to
implement multiple inheritance somewhere because of the constraints, I had to use interface in
JAVA, but in CPP there is no such restriction of not able to implement Multiple or Hybrid
inheritance.
My Code doesn’t require exception handling as I have covered all the corner cases by coding in
a generalized way.
The only limitation I encountered so far, was the maximum text size I allow. In all the cases, I
have set it to 10000, thus if a text with size more than this maximum limit is given, my program
will fail.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
[object Object]