Sufix Tree - Application 1 - Pattern Find
Given a string S and a pattern P, print all occurrences of P in S. Use Suffix Tree only.Input Format
Input consists of 2 linesOutput Format
First contains string S, second contains pattern P
Print all the occurances of pattern in stringQuestion Video
|S| <= 10^5Sample Input
abcbccSample Output
bc
1
3
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run