C Project Template
Loading...
Searching...
No Matches
Garble Text Filter: An application of Robin-Karp Algorithm

Problem Statment

  • Input
    • Text: DSARANDOMTEXTISSOHARD
    • Pattern: RTTX
  • Output
    • D|SAISSOHARD|D

The text is filtered by pattern, and further labelled with duplicates (|).

Definition

Garbled text

  • Let C1,...,Cn be unique characters of a pattern.
    • For G="TGET", we have C1=T, C2=G, C3=E

Notes

Converting String to ASCII