> 
> **Possible Duplicate:**  
> 
> [What is the fastest substring search algorithm?](https://stackoverflow.com/questions/3183582/what-is-the-fastest-substring-search-algorithm) 
> 
> 
> 

How do I check if a string is present in a bigger string of length of 100,000 characters in C++ or Java?

I know a method `str.find("sub_string");` but it can't handle such a big string. 
The max execution time is 1 sec.

Also the sub strings I need to look for can be 50,000!