Redirecting to
NADOS

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 lines
First contains string S, second contains pattern P
Output Format
Print all the occurances of pattern in string
Question Video
Constraints
|S| <= 10^5
Sample Input
abcbcc
bc
Sample Output
1
3


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name