Computing Patterns in Strings