- Input
- Text:
DSARANDOMTEXTISSOHARD
- Pattern:
RTTX
- Text:
- Output
D|SAISSOHARD|D
The text is filtered by pattern, and further labelled with duplicates (|
).
- Let
C1,...,Cn
be unique characters of a pattern.- For
G="TGET"
, we haveC1=T
,C2=G
,C3=E
- For