Searching for Patterns problems