# Tag Archives: Suffix-Tree

Given a string of length n of lowercase alphabet characters, we need to count total number of distinct substrings of this string. Examples: Input :â€¦ Read More
Introduction: Graph: A graph is a collection of vertices (nodes) and edges that represent relationships between the vertices. Graphs are used to model and analyzeâ€¦ Read More
Given a string, find the longest substring which is palindrome.We have already discussed NaÃ¯ve [O(n3)], quadratic [O(n2)] and linear [O(n)] approaches in Set 1, Setâ€¦ Read More
Given two strings X and Y, find the Longest Common Substring of X and Y.Naive [O(N*M2)] and Dynamic Programming [O(N*M)] approaches are already discussed here. Inâ€¦ Read More
In earlier suffix tree articles, we created suffix tree for one string and then we queried that tree for substring check, searching all patterns, longestâ€¦ Read More
Given a string, build it’s Suffix Array We have already discussed following two ways of building suffix array:   Naive O(n2Logn) algorithm Enhanced O(nLogn) algorithm Please goâ€¦ Read More
Given a text string, find Longest Repeated Substring in the text. If there are more than one Longest Repeated Substrings, get any one of them.  â€¦ Read More
Given a text string and a pattern string, find all occurrences of the pattern in string. Few pattern searching algorithms (KMP, Rabin-Karp, Naive Algorithm, Finiteâ€¦ Read More
Given a text string and a pattern string, check if a pattern exists in text or not.Few pattern searching algorithms (KMP, Rabin-Karp, Naive Algorithm, Finiteâ€¦ Read More